@ptkl/sdk 0.10.0 → 0.10.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ptkl/sdk",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "scripts": {
5
5
  "build": "rollup -c",
6
6
  "build:monaco": "npm run build && node scripts/generate-monaco-types.cjs",
@@ -1,5 +1,7 @@
1
+ import { AxiosResponse } from "axios";
2
+ import { ComponentListResponse } from "../types/component";
1
3
  import PlatformBaseClient from "./platformBaseClient";
2
4
  export default class ComponentUtils extends PlatformBaseClient {
3
- list(): Promise<import("axios").AxiosResponse<any, any>>;
4
- create(data: any): Promise<import("axios").AxiosResponse<any, any>>;
5
+ list(): Promise<AxiosResponse<ComponentListResponse>>;
6
+ create(data: any): Promise<AxiosResponse<any, any>>;
5
7
  }
@@ -1,6 +1,6 @@
1
1
  import IntegrationsBaseClient from "../integrationsBaseClient";
2
2
  import { AxiosResponse } from "axios";
3
- import { PDFFillOptions, DataConversionParams, DataValidationParams, DataInfoParams, DataInfo, DataValidationResult, ConversionOptions, HTML2PDFOptions } from "../../types/integrations";
3
+ import { PDFFillOptions, DataConversionParams, DataValidationParams, DataInfoParams, DataInfo, DataValidationResult, ConversionOptions, HTML2PDFOptions, PDF2HTMLOptions, MediaUploadPayload, MediaUploadBase64Payload, DocumentListParams, DocumentListResponse, DocumentCreatePayload, DocumentUpdatePayload, DocumentRestorePayload, DocumentCommentPayload, DocumentResponse } from "../../types/integrations";
4
4
  /**
5
5
  * Document Management System (DMS) API client
6
6
  *
@@ -83,17 +83,66 @@ import { PDFFillOptions, DataConversionParams, DataValidationParams, DataInfoPar
83
83
  export default class DMS extends IntegrationsBaseClient {
84
84
  list(data: any): Promise<AxiosResponse<any, any>>;
85
85
  libraries(): Promise<AxiosResponse<any, any>>;
86
- upload(payload: any): Promise<AxiosResponse<any, any> | undefined>;
86
+ /**
87
+ * Upload files using multipart form data
88
+ *
89
+ * @param payload - Upload configuration with files, directory, and options
90
+ * @returns Upload response from the server
91
+ *
92
+ * @example
93
+ * ```typescript
94
+ * const result = await dms.upload({
95
+ * files: [file1, file2],
96
+ * uploadDir: '/documents/invoices',
97
+ * public: true,
98
+ * replace: true,
99
+ * metadata: { category: 'finance' }
100
+ * });
101
+ * ```
102
+ */
103
+ upload(payload: MediaUploadPayload): Promise<AxiosResponse<any, any> | undefined>;
87
104
  delete(data: any): Promise<AxiosResponse<any, any>>;
88
- uploadBase64(data: any): Promise<AxiosResponse<any, any>>;
89
- getMedia(lib: string, key: string, encoding: string): Promise<AxiosResponse<any, any>>;
90
- download(lib: string, key: string): Promise<AxiosResponse<any, any>>;
105
+ /**
106
+ * Upload files using base64-encoded content
107
+ *
108
+ * @param data - Upload payload with base64-encoded files
109
+ * @returns Upload response from the server
110
+ *
111
+ * @example
112
+ * ```typescript
113
+ * const result = await dms.uploadBase64({
114
+ * path: '/documents/reports',
115
+ * is_public: false,
116
+ * replace: true,
117
+ * files: [
118
+ * {
119
+ * name: 'report.pdf',
120
+ * content_type: 'application/pdf',
121
+ * data: 'base64EncodedContent...'
122
+ * }
123
+ * ]
124
+ * });
125
+ * ```
126
+ */
127
+ uploadBase64(data: MediaUploadBase64Payload): Promise<AxiosResponse<any, any>>;
128
+ getMedia(key: string, encoding: string): Promise<AxiosResponse<any, any>>;
129
+ download(key: string): Promise<AxiosResponse<any, any>>;
91
130
  getExifData(key: string): Promise<AxiosResponse<any, any>>;
92
131
  html2pdf(data: HTML2PDFOptions): Promise<AxiosResponse<any, any>>;
132
+ pdf2html(data: PDF2HTMLOptions): Promise<AxiosResponse<any, any>>;
93
133
  createDir(path: string): Promise<AxiosResponse<any, any>>;
94
134
  deleteDir(path: string): Promise<AxiosResponse<any, any>>;
95
135
  dirs(data: string): Promise<AxiosResponse<any, any>>;
96
- fillPdf(lib: string, data: PDFFillOptions): Promise<AxiosResponse<any, any>>;
136
+ createDocument(payload: DocumentCreatePayload): Promise<AxiosResponse<DocumentResponse>>;
137
+ getDocument(path: string): Promise<AxiosResponse<DocumentResponse>>;
138
+ getDocumentRaw(path: string): Promise<AxiosResponse<any, any>>;
139
+ updateDocument(payload: DocumentUpdatePayload): Promise<AxiosResponse<DocumentResponse>>;
140
+ deleteDocument(path: string): Promise<AxiosResponse<any, any>>;
141
+ listDocuments(params?: DocumentListParams): Promise<AxiosResponse<DocumentListResponse>>;
142
+ listDeletedDocuments(params?: DocumentListParams): Promise<AxiosResponse<DocumentListResponse>>;
143
+ restoreDocument(payload: DocumentRestorePayload): Promise<AxiosResponse<DocumentResponse>>;
144
+ createDocumentComment(payload: DocumentCommentPayload): Promise<AxiosResponse<any, any>>;
145
+ fillPdf(data: PDFFillOptions): Promise<AxiosResponse<any, any>>;
97
146
  /**
98
147
  * Convert data between different formats (JSON, CSV, Excel)
99
148
  *
@@ -155,7 +204,7 @@ export default class DMS extends IntegrationsBaseClient {
155
204
  * // excelResult.data is a Blob
156
205
  * ```
157
206
  */
158
- convertData(lib: string, data: any, params: DataConversionParams): Promise<AxiosResponse<any>>;
207
+ convertData(data: any, params: DataConversionParams): Promise<AxiosResponse<any>>;
159
208
  /**
160
209
  * Get information about data format and structure
161
210
  *
@@ -187,7 +236,7 @@ export default class DMS extends IntegrationsBaseClient {
187
236
  * // }
188
237
  * ```
189
238
  */
190
- getDataInfo(lib: string, data: any, params: DataInfoParams): Promise<AxiosResponse<DataInfo>>;
239
+ getDataInfo(data: any, params: DataInfoParams): Promise<AxiosResponse<DataInfo>>;
191
240
  /**
192
241
  * Validate data format without performing conversion
193
242
  *
@@ -222,7 +271,7 @@ export default class DMS extends IntegrationsBaseClient {
222
271
  * }
223
272
  * ```
224
273
  */
225
- validateData(lib: string, data: any, params: DataValidationParams): Promise<AxiosResponse<DataValidationResult>>;
274
+ validateData(data: any, params: DataValidationParams): Promise<AxiosResponse<DataValidationResult>>;
226
275
  /**
227
276
  * Convert JSON data to CSV format
228
277
  *
@@ -261,7 +310,7 @@ export default class DMS extends IntegrationsBaseClient {
261
310
  * // Auto-detects header, items, and footer sections
262
311
  * ```
263
312
  */
264
- jsonToCsv(lib: string, jsonData: any, options?: ConversionOptions): Promise<AxiosResponse<string>>;
313
+ jsonToCsv(jsonData: any, options?: ConversionOptions): Promise<AxiosResponse<string>>;
265
314
  /**
266
315
  * Convert JSON data to Excel (.xlsx) format
267
316
  *
@@ -307,7 +356,7 @@ export default class DMS extends IntegrationsBaseClient {
307
356
  * link.click();
308
357
  * ```
309
358
  */
310
- jsonToExcel(lib: string, jsonData: any, options?: ConversionOptions): Promise<AxiosResponse<Blob>>;
359
+ jsonToExcel(jsonData: any, options?: ConversionOptions): Promise<AxiosResponse<Blob>>;
311
360
  /**
312
361
  * Convert CSV data to JSON format
313
362
  *
@@ -330,7 +379,7 @@ export default class DMS extends IntegrationsBaseClient {
330
379
  * // ]
331
380
  * ```
332
381
  */
333
- csvToJson(lib: string, csvData: string): Promise<AxiosResponse<any[]>>;
382
+ csvToJson(csvData: string): Promise<AxiosResponse<any[]>>;
334
383
  /**
335
384
  * Convert CSV data to Excel (.xlsx) format
336
385
  *
@@ -355,7 +404,7 @@ export default class DMS extends IntegrationsBaseClient {
355
404
  * // Use url for download or further processing
356
405
  * ```
357
406
  */
358
- csvToExcel(lib: string, csvData: string, options?: ConversionOptions): Promise<AxiosResponse<Blob>>;
407
+ csvToExcel(csvData: string, options?: ConversionOptions): Promise<AxiosResponse<Blob>>;
359
408
  /**
360
409
  * Convert Excel (.xlsx) data to JSON format
361
410
  *
@@ -382,7 +431,7 @@ export default class DMS extends IntegrationsBaseClient {
382
431
  * const jsonFromBuffer = await dms.excelToJson(libraryRef, arrayBuffer);
383
432
  * ```
384
433
  */
385
- excelToJson(lib: string, excelData: Blob | ArrayBuffer, options?: ConversionOptions): Promise<AxiosResponse<any[]>>;
434
+ excelToJson(excelData: Blob | ArrayBuffer, options?: ConversionOptions): Promise<AxiosResponse<any[]>>;
386
435
  /**
387
436
  * Convert Excel (.xlsx) data to CSV format
388
437
  *
@@ -413,7 +462,8 @@ export default class DMS extends IntegrationsBaseClient {
413
462
  * link.click();
414
463
  * ```
415
464
  */
416
- excelToCsv(lib: string, excelData: Blob | ArrayBuffer, options?: ConversionOptions): Promise<AxiosResponse<string>>;
465
+ excelToCsv(excelData: Blob | ArrayBuffer, options?: ConversionOptions): Promise<AxiosResponse<string>>;
417
466
  request(method: string, endpoint: string, params?: any): Promise<AxiosResponse<any, any>>;
467
+ requestv2(method: string, endpoint: string, params?: any): Promise<AxiosResponse<any, any>>;
418
468
  requestv1(method: string, endpoint: string, params?: any): Promise<AxiosResponse<any, any>>;
419
469
  }
@@ -0,0 +1,289 @@
1
+ import IntegrationsBaseClient from "../integrationsBaseClient";
2
+ import { MinimaxAccount, MinimaxAddress, MinimaxAnalytic, MinimaxBankAccount, MinimaxContact, MinimaxCountry, MinimaxCurrency, MinimaxCustomer, MinimaxDashboardData, MinimaxDocument, MinimaxDocumentAttachment, MinimaxDocumentNumbering, MinimaxEFaktura, MinimaxEmployee, MinimaxExchangeRate, MinimaxInbox, MinimaxInboxAttachment, MinimaxIssuedInvoice, MinimaxIssuedInvoicePosting, MinimaxItem, MinimaxJournal, MinimaxJournalEntry, MinimaxJournalType, MinimaxJournalVatEntry, MinimaxLeanCustomer, MinimaxLeanDocument, MinimaxLeanEmployee, MinimaxLeanIssuedInvoice, MinimaxLeanIssuedInvoicePosting, MinimaxLeanItem, MinimaxLeanJournal, MinimaxLeanOrder, MinimaxLeanReceivedInvoice, MinimaxLeanStockEntry, MinimaxOrder, MinimaxOrganisation, MinimaxOutbox, MinimaxPaymentMethod, MinimaxPayrollSettings, MinimaxPostalCode, MinimaxProductGroup, MinimaxPurposeCode, MinimaxReceivedInvoice, MinimaxReceivedInvoiceAttachment, MinimaxReference, MinimaxReportTemplate, MinimaxSearchParams, MinimaxSearchResult, MinimaxStock, MinimaxStockEntry, MinimaxSyncReference, MinimaxSyncSearchParams, MinimaxUser, MinimaxVatAccountingType, MinimaxVatRate, MinimaxWarehouse } from "../../types/integrations/minimax";
3
+ export default class Minimax extends IntegrationsBaseClient {
4
+ settings(): Promise<import("axios").AxiosResponse<any, any>>;
5
+ getAccounts(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxAccount>): Promise<MinimaxSearchResult<MinimaxAccount>>;
6
+ getAccount(userId: string, organisationId: number, accountId: number): Promise<MinimaxAccount>;
7
+ getAccountByCode(userId: string, organisationId: number, code: string): Promise<MinimaxAccount>;
8
+ getAccountByContent(userId: string, organisationId: number, content: string): Promise<MinimaxAccount>;
9
+ getAccountsForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxAccount>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
10
+ /** ADDRESSES */
11
+ getAddresses(userId: string, organisationId: number, customerId: number, params?: MinimaxSearchParams<MinimaxAddress>): Promise<MinimaxSearchResult<MinimaxAddress>>;
12
+ newAddress(userId: string, organisationId: number, customerId: number, address: MinimaxAddress): Promise<{}>;
13
+ deleteAddress(userId: string, organisationId: number, customerId: number, addressId: number): Promise<{}>;
14
+ getAddress(userId: string, organisationId: number, customerId: number, addressId: number): Promise<MinimaxAddress>;
15
+ updateAddress(userId: string, organisationId: number, customerId: number, address: MinimaxAddress): Promise<{}>;
16
+ getAddressesForSync(userId: string, organisationId: number, customerId: number, params?: MinimaxSyncSearchParams<MinimaxAddress>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
17
+ /** ANALYTICS */
18
+ getAnalytics(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxAnalytic>): Promise<MinimaxSearchResult<MinimaxAnalytic>>;
19
+ newAnalytic(userId: string, organisationId: number, analytic: MinimaxAnalytic): Promise<{}>;
20
+ deleteAnalytic(userId: string, organisationId: number, analyticId: number): Promise<{}>;
21
+ getAnalytic(userId: string, organisationId: number, analyticId: number): Promise<MinimaxAnalytic>;
22
+ updateAnalytic(userId: string, organisationId: number, analytic: MinimaxAnalytic): Promise<{}>;
23
+ getAnalyticsForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxAnalytic>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
24
+ /** BANK ACCOUNTS */
25
+ getBankAccounts(userId: string, organisationId: number, customerId: number, params?: MinimaxSearchParams<MinimaxBankAccount>): Promise<MinimaxSearchResult<MinimaxBankAccount>>;
26
+ newBankAccount(userId: string, organisationId: number, customerId: number, bankAccount: MinimaxBankAccount): Promise<{}>;
27
+ deleteBankAccount(userId: string, organisationId: number, customerId: number, bankAccountId: number): Promise<{}>;
28
+ getBankAccount(userId: string, organisationId: number, customerId: number, bankAccountId: number): Promise<MinimaxBankAccount>;
29
+ updateBankAccount(userId: string, organisationId: number, customerId: number, bankAccount: MinimaxBankAccount): Promise<{}>;
30
+ getBankAccountsForSync(userId: string, organisationId: number, customerId: number, params?: MinimaxSyncSearchParams<MinimaxBankAccount>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
31
+ /** CONTACTS */
32
+ getCustomerContacts(userId: string, organisationId: number, customerId: number, params?: MinimaxSearchParams<MinimaxContact>): Promise<MinimaxSearchResult<MinimaxContact>>;
33
+ newContact(userId: string, organisationId: number, customerId: number, contact: MinimaxContact): Promise<{}>;
34
+ deleteContact(userId: string, organisationId: number, customerId: number, contactId: number): Promise<{}>;
35
+ getContact(userId: string, organisationId: number, customerId: number, contactId: number): Promise<MinimaxContact>;
36
+ updateContact(userId: string, organisationId: number, customerId: number, contact: MinimaxContact): Promise<{}>;
37
+ getContacts(userId: string, organisationId: number, params?: Omit<MinimaxSearchParams<MinimaxContact>, "SearchString"> & {
38
+ Email?: string;
39
+ }): Promise<MinimaxSearchResult<MinimaxContact>>;
40
+ getContactForSync(userId: string, organisationId: number, customerId: number, params?: MinimaxSyncSearchParams<MinimaxContact>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
41
+ /** COUNTRIES */
42
+ getCountries(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxCountry>): Promise<MinimaxSearchResult<MinimaxCountry>>;
43
+ getCountry(userId: string, organisationId: number, countryId: number): Promise<MinimaxCountry>;
44
+ getCountryByCode(userId: string, organisationId: number, code: string): Promise<MinimaxCountry>;
45
+ getCountriesForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxCountry>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
46
+ /** CURRENCIES */
47
+ getCurrencies(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxCurrency>): Promise<MinimaxSearchResult<MinimaxCurrency>>;
48
+ getCurrency(userId: string, organisationId: number, currencyId: number): Promise<MinimaxCurrency>;
49
+ getCurrencyByDate(userId: string, organisationId: number, date: Date): Promise<MinimaxCurrency>;
50
+ getCurrencyByCode(userId: string, organisationId: number, code: string): Promise<MinimaxCurrency>;
51
+ getCurrenciesForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxCurrency>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
52
+ /** CUSTOMERS */
53
+ getCustomers(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxLeanCustomer>): Promise<MinimaxSearchResult<MinimaxLeanCustomer>>;
54
+ newCustomer(userId: string, organisationId: number, customer: MinimaxCustomer): Promise<{}>;
55
+ deleteCusomter(userId: string, organisationId: number, customerId: number): Promise<{}>;
56
+ getCustomer(userId: string, organisationId: number, customerId: number): Promise<MinimaxCustomer>;
57
+ updateCustomer(userId: string, organisationId: number, customer: MinimaxCustomer): Promise<{}>;
58
+ getCustomerByCode(userId: string, organisationId: number, code: string): Promise<MinimaxCustomer>;
59
+ newCustomerByTaxNumber(userId: string, organisationId: number, taxNumber: string): Promise<{}>;
60
+ getCustomersForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxCustomer>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
61
+ /** DASHBOARDS */
62
+ getDashboardsData(userId: string, organisationId: number): Promise<MinimaxDashboardData>;
63
+ /** DOCUMENTS */
64
+ getDocuments(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxLeanDocument>): Promise<MinimaxSearchResult<MinimaxLeanDocument>>;
65
+ newDocument(userId: string, organisationId: number, document: MinimaxDocument): Promise<{}>;
66
+ deleteDocument(userId: string, organisationId: number, documentId: number): Promise<{}>;
67
+ getDocument(userId: string, organisationId: number, documentId: number): Promise<MinimaxDocument>;
68
+ updateDocument(userId: string, organisationId: number, document: MinimaxDocument): Promise<{}>;
69
+ deleteDocumentAttachment(userId: string, organisationId: number, documentId: number, documentAttachmentId: number): Promise<{}>;
70
+ getDocumentAttachment(userId: string, organisationId: number, documentId: number, documentAttachmentId: number): Promise<MinimaxDocumentAttachment>;
71
+ updateDocumentAttachment(userId: string, organisationId: number, documentId: number, documentAttachment: MinimaxDocumentAttachment): Promise<{}>;
72
+ newDocumentAttachment(userId: string, organisationId: number, documentId: number, documentAttachment: MinimaxDocumentAttachment): Promise<{}>;
73
+ getDocumentsForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxDocument>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
74
+ /** DOCUMENT NUMBERINGS */
75
+ getDocumentNumberings(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxDocumentNumbering>): Promise<MinimaxSearchResult<MinimaxDocumentNumbering>>;
76
+ getDocumentNumbering(userId: string, organisationId: number, documentNumberingId: number): Promise<MinimaxDocumentNumbering>;
77
+ /** EFAKTURA */
78
+ getEFakturaList(userId: string, params?: Omit<MinimaxSearchParams<MinimaxEFaktura>, "SearchString"> & {
79
+ RegistrationNumber: string;
80
+ BudgetUserNumber: string;
81
+ VatIdentificationNumber: string;
82
+ Name: string;
83
+ }): Promise<MinimaxSearchResult<MinimaxEFaktura>>;
84
+ /** EMPLOYEES */
85
+ getEmployees(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxLeanEmployee>): Promise<MinimaxSearchResult<MinimaxLeanEmployee>>;
86
+ newEmployee(userId: string, organisationId: number, employee: MinimaxEmployee): Promise<{}>;
87
+ deleteEmployee(userId: string, organisationId: number, employeeId: number): Promise<{}>;
88
+ getEmployee(userId: string, organisationId: number, employeeId: number): Promise<MinimaxEmployee>;
89
+ updateEmployee(userId: string, organisationId: number, employee: MinimaxEmployee): Promise<{}>;
90
+ getEmployeesForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxEmployee>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
91
+ /** EXCHANGE RATES */
92
+ getExchangeRate(userId: string, organisationId: number, currencyId: number): Promise<MinimaxExchangeRate>;
93
+ getExchangeRateByCode(userId: string, organisationId: number, currencyCode: string): Promise<MinimaxExchangeRate>;
94
+ /** INBOX */
95
+ getInboxes(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxInbox>): Promise<MinimaxSearchResult<MinimaxInbox>>;
96
+ newInbox(userId: string, organisationId: number, inbox: MinimaxInbox): Promise<{}>;
97
+ deleteInbox(userId: string, organisationId: number, inboxId: number): Promise<{}>;
98
+ getInbox(userId: string, organisationId: number, inboxId: number): Promise<MinimaxInbox>;
99
+ newInboxAttachment(userId: string, organisationId: number, inboxId: number, inboxAttachment: MinimaxInboxAttachment): Promise<{}>;
100
+ deleteInboxAttachment(userId: string, organisationId: number, inboxId: number, inboxAttachmentId: number): Promise<{}>;
101
+ actionOnInbox(userId: string, organisationId: number, inboxId: number, action: "approve" | "reject"): Promise<{}>;
102
+ /** ISSUED INVOICE */
103
+ getIssuedInvoices(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxLeanIssuedInvoice>): Promise<MinimaxSearchResult<MinimaxLeanIssuedInvoice>>;
104
+ newIssuedInvoice(userId: string, organisationId: number, issuedInvoice: MinimaxIssuedInvoice): Promise<{}>;
105
+ deleteIssuedInvoice(userId: string, organisationId: number, issuedInvoiceId: number): Promise<{}>;
106
+ getIssuedInvoice(userId: string, organisationId: number, issuedInvoiceId: number): Promise<MinimaxIssuedInvoice>;
107
+ updateIssuedInvoice(userId: string, organisationId: number, issuedInvoice: MinimaxIssuedInvoice): Promise<{}>;
108
+ actionOnIssuedInvoice(userId: string, organisationId: number, issuedInvoiceId: number, action: "issue" | "issueCancellation" | "generatepdf" | "copytocreditnote" | "copyToReverse" | "issueAndGeneratepdf" | "sendEInvoice"): Promise<{}>;
109
+ getIssuedInvoicesForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxLeanIssuedInvoice>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
110
+ getPaymentMethodsOnIssuedInvoices(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxPaymentMethod>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
111
+ /** ISSUED INVOICE POSTING */
112
+ getIssuedInvoicePostings(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxLeanIssuedInvoicePosting>): Promise<MinimaxSearchResult<MinimaxLeanIssuedInvoicePosting>>;
113
+ newIssuedInvoicePosting(userId: string, organisationId: number, issuedInvoicePosting: MinimaxIssuedInvoicePosting): Promise<{}>;
114
+ deleteIssuedInvoicePosting(userId: string, organisationId: number, issuedInvoicePostingId: number): Promise<{}>;
115
+ getIssuedInvoicePosting(userId: string, organisationId: number, issuedInvoicePostingId: number): Promise<MinimaxIssuedInvoicePosting>;
116
+ getPaymentMethodsOnIssuedInvoicePostings(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxPaymentMethod>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
117
+ actionOnIssuedInvoicePosting(userId: string, organisationId: number, issuedInvoicePostingId: number, action: "issue" | "issueCancellation"): Promise<{}>;
118
+ /** ITEMS */
119
+ getItems(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxLeanItem>): Promise<MinimaxSearchResult<MinimaxLeanItem>>;
120
+ newItem(userId: string, organisationId: number, item: MinimaxItem): Promise<{}>;
121
+ deleteItem(userId: string, organisationId: number, itemId: number): Promise<{}>;
122
+ getItem(userId: string, organisationId: number, itemId: number): Promise<MinimaxItem>;
123
+ updateItem(userId: string, organisationId: number, item: MinimaxItem): Promise<{}>;
124
+ getItemByCode(userId: string, organisationId: number, code: string): Promise<MinimaxItem>;
125
+ getItemSettings(userId: string, organisationId: number, code: string): Promise<{
126
+ PricesIncludeVAT: string;
127
+ }>;
128
+ getItemData(userId: string, organisationId: number, params: {
129
+ WarehouseId: number;
130
+ CustomerId: number;
131
+ ItemId: number;
132
+ }): Promise<{
133
+ Rows: (Pick<MinimaxItem, "Title" | "Code" | "Price" | "UnitOfMeasurement"> & {
134
+ Item: MinimaxReference;
135
+ Warehouse: MinimaxReference;
136
+ Customer: MinimaxReference;
137
+ })[];
138
+ ValidationMessages: {
139
+ Message: string;
140
+ PropertyName: string;
141
+ }[];
142
+ }>;
143
+ getItemPricelist(userId: string, organisationId: number, params: {
144
+ WarehouseId: number;
145
+ CustomerId: number;
146
+ ItemId: number;
147
+ }): Promise<{
148
+ Rows: (Pick<MinimaxItem, "Title" | "Code" | "UnitOfMeasurement"> & {
149
+ PriceWithoutVAT: number;
150
+ PriceWithVAT: number;
151
+ Item: MinimaxReference;
152
+ Warehouse: MinimaxReference;
153
+ Customer: MinimaxReference;
154
+ })[];
155
+ ValidationMessages: {
156
+ Message: string;
157
+ PropertyName: string;
158
+ }[];
159
+ }>;
160
+ getItemsForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxLeanItem>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
161
+ /** JOURNALS */
162
+ getJournals(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxLeanJournal>): Promise<MinimaxSearchResult<MinimaxLeanJournal>>;
163
+ newJournal(userId: string, organisationId: number, journal: MinimaxJournal): Promise<{}>;
164
+ deleteJournal(userId: string, organisationId: number, journalId: number): Promise<{}>;
165
+ getJournal(userId: string, organisationId: number, journalId: number): Promise<MinimaxJournal>;
166
+ updateJournal(userId: string, organisationId: number, journal: MinimaxJournal): Promise<{}>;
167
+ deleteJournalVatEntry(userId: string, organisationId: number, journalId: number, vatId: number): Promise<{}>;
168
+ getJournalVatEntry(userId: string, organisationId: number, journalId: number, vatId: number): Promise<MinimaxJournalVatEntry>;
169
+ updateJournalVatEntry(userId: string, organisationId: number, journalId: number, vatEntry: MinimaxJournalVatEntry): Promise<{}>;
170
+ newJournalVatEntry(userId: string, organisationId: number, journalId: number, vatEntry: MinimaxJournalVatEntry): Promise<{}>;
171
+ getJournalsForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxLeanJournal>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
172
+ getJournalsInVODStandard(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxLeanJournal> & {
173
+ DateTo?: string;
174
+ DateFrom?: string;
175
+ JournalId?: number;
176
+ FromJournalId?: number;
177
+ }): Promise<{
178
+ Version: string;
179
+ Content: string;
180
+ StatusCode: string;
181
+ ReasonPhrase: string;
182
+ Headers: string;
183
+ RequestMessage: string;
184
+ IsSuccessStatusCode: string;
185
+ }>;
186
+ getJournalEntries(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxJournalEntry>): Promise<MinimaxSearchResult<MinimaxJournalEntry>>;
187
+ /** JOURNAL TYPES */
188
+ getJournalTypes(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxJournalType>): Promise<MinimaxSearchResult<MinimaxJournalType>>;
189
+ getJournalType(userId: string, organisationId: number, journalTypeId: number): Promise<MinimaxJournalType>;
190
+ getJournalTypeByCode(userId: string, organisationId: number, code: string): Promise<MinimaxJournalType>;
191
+ getJournalTypesForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxJournalType>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
192
+ /** ORDERS */
193
+ getOrders(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxLeanOrder>): Promise<MinimaxSearchResult<MinimaxLeanOrder>>;
194
+ newOrder(userId: string, organisationId: number, order: MinimaxOrder): Promise<{}>;
195
+ deleteOrder(userId: string, organisationId: number, orderId: number): Promise<{}>;
196
+ getOrder(userId: string, organisationId: number, orderId: number): Promise<MinimaxOrder>;
197
+ updateOrder(userId: string, organisationId: number, order: MinimaxOrder): Promise<{}>;
198
+ actionGetOnOrder(userId: string, organisationId: number, orderId: number, action: "getorderpdf", params?: {
199
+ rowVersion?: string;
200
+ }): Promise<{}>;
201
+ actionPutOnOrder(userId: string, organisationId: number, orderId: number, action: "confirm" | "cancelConfirmation" | "complete" | "cancelCompletion" | "invalidate" | "cancelInvalidation" | "createissuedinvoice" | "generatepdf", params?: {
202
+ rowVersion?: string;
203
+ }): Promise<{}>;
204
+ getOrdersForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxLeanOrder>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
205
+ /** ORGANISATIONS */
206
+ getOrganisation(userId: string, organisationId: number): Promise<MinimaxOrganisation>;
207
+ getAllOrganisations(userId: string, params: {
208
+ startRowIndex: number;
209
+ endRowIndex: number;
210
+ searchString: string;
211
+ }): Promise<MinimaxSearchResult<MinimaxOrganisation>>;
212
+ /** OUTBOX */
213
+ getAllOuboxes(userId: string, organisationId: number, params: MinimaxSearchParams<MinimaxOutbox> & {
214
+ OutboxType?: string;
215
+ OutboxImportStatus?: string;
216
+ OutboxDateFrom?: string;
217
+ OutboxDateTo?: string;
218
+ }): Promise<MinimaxSearchResult<MinimaxOutbox>>;
219
+ getOutbox(userId: string, organisationId: number, outboxId: number): Promise<MinimaxOutbox>;
220
+ /** PAYMENT METHODS */
221
+ getPaymentMethods(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxPaymentMethod>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
222
+ /** PAYROLL SETTINGS */
223
+ getPayrollSettingsByCode(userId: string, code: string): Promise<MinimaxPayrollSettings>;
224
+ /** POSTAL CODE */
225
+ getPostalCodesByCountry(userId: string, organisationId: number, countryId: number, params?: MinimaxSearchParams<MinimaxPostalCode>): Promise<MinimaxSearchResult<MinimaxPostalCode>>;
226
+ getPostalCode(userId: string, organisationId: number, postalCodeId: number): Promise<MinimaxPostalCode>;
227
+ getPostalCodesForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxPostalCode>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
228
+ /** PRODUCT GROUPS */
229
+ getProductGroups(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxProductGroup>): Promise<MinimaxSearchResult<MinimaxProductGroup>>;
230
+ newProductGroup(userId: string, organisationId: number, productGroup: MinimaxProductGroup): Promise<{}>;
231
+ deleteProductGroup(userId: string, organisationId: number, productGroupId: number): Promise<{}>;
232
+ getProductGroup(userId: string, organisationId: number, productGroupId: number): Promise<MinimaxProductGroup>;
233
+ updateProductGroup(userId: string, organisationId: number, productGroup: MinimaxProductGroup): Promise<{}>;
234
+ getProductGroupsForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxProductGroup>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
235
+ /** PURPOSE CODE */
236
+ getPurposeCodes(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxPurposeCode>): Promise<MinimaxSearchResult<MinimaxPurposeCode>>;
237
+ getPurposeCode(userId: string, organisationId: number, purposeCodeId: number): Promise<MinimaxPurposeCode>;
238
+ getPurposeCodeByCode(userId: string, organisationId: number, code: string): Promise<MinimaxPurposeCode>;
239
+ getPurposeCodesForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxPurposeCode>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
240
+ /** RECEIVED INVOICES */
241
+ deleteReceivedInvoice(userId: string, organisationId: number, receivedInvoiceId: number): Promise<{}>;
242
+ getReceivedInvoice(userId: string, organisationId: number, receivedInvoiceId: number): Promise<MinimaxReceivedInvoice>;
243
+ updateReceivedInvoice(userId: string, organisationId: number, receivedInvoice: MinimaxReceivedInvoice): Promise<{}>;
244
+ getReceivedInvoices(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxLeanReceivedInvoice>): Promise<MinimaxSearchResult<MinimaxLeanReceivedInvoice>>;
245
+ newReceivedInvoice(userId: string, organisationId: number, receivedInvoice: MinimaxReceivedInvoice): Promise<{}>;
246
+ getReceivedInvoicesAttachments(userId: string, organisationId: number, receivedInvoiceId: number, params?: MinimaxSearchParams<MinimaxReceivedInvoiceAttachment>): Promise<MinimaxSearchResult<MinimaxReceivedInvoiceAttachment>>;
247
+ newReceivedInvoiceAttachment(userId: string, organisationId: number, receivedInvoiceId: number, attachment: MinimaxReceivedInvoiceAttachment): Promise<{}>;
248
+ /** REPORT TEMPLATES */
249
+ getReportTemplates(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxReportTemplate>): Promise<MinimaxSearchResult<MinimaxReportTemplate>>;
250
+ getReportTemplate(userId: string, organisationId: number, reportTemplateId: number): Promise<MinimaxReportTemplate>;
251
+ getReportTemplatesForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxReportTemplate>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
252
+ /** STOCK */
253
+ getStock(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxStock>): Promise<MinimaxSearchResult<MinimaxStock>>;
254
+ getStockForItem(userId: string, organisationId: number, itemId: number): Promise<MinimaxStock>;
255
+ /** STOCK ENTRIES */
256
+ getStockEntries(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxLeanStockEntry>): Promise<MinimaxSearchResult<MinimaxLeanStockEntry>>;
257
+ newStockEntry(userId: string, organisationId: number, stockEntry: MinimaxStockEntry): Promise<{}>;
258
+ deleteStockEntry(userId: string, organisationId: number, stockEntryId: number): Promise<{}>;
259
+ getStockEntry(userId: string, organisationId: number, stockEntryId: number): Promise<MinimaxStockEntry>;
260
+ updateStockEntry(userId: string, organisationId: number, stockEntry: MinimaxStockEntry): Promise<{}>;
261
+ actionGetOnStockEntry(userId: string, organisationId: number, stockEntryId: number, action: "getDeliveryNotepdf", params?: {
262
+ rowVersion?: string;
263
+ }): Promise<{}>;
264
+ actionPutOnStockEntry(userId: string, organisationId: number, stockEntryId: number, action: "confirm" | "cancelConfirmation", params?: {
265
+ rowVersion?: string;
266
+ }): Promise<{}>;
267
+ /** USERS */
268
+ getCurrentUser(userId: string): Promise<MinimaxUser>;
269
+ getCurrentUserOrgs(userId: string): Promise<MinimaxSearchResult<{
270
+ Organisation: MinimaxReference;
271
+ APIAccess: string;
272
+ MobileAccess: string;
273
+ }>>;
274
+ /** VAT ACCOUNTING TYPES */
275
+ getVatAccountingTypes(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxVatAccountingType>): Promise<MinimaxSearchResult<MinimaxVatAccountingType>>;
276
+ getVatAccountingTypesForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxVatAccountingType>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
277
+ /** VAT RATES */
278
+ getVatRates(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxVatRate>): Promise<MinimaxSearchResult<MinimaxVatRate>>;
279
+ getVatRate(userId: string, organisationId: number, vatRateId: number): Promise<MinimaxVatRate>;
280
+ getVatRateByCode(userId: string, organisationId: number, code: string): Promise<MinimaxVatRate>;
281
+ getVatRatesForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxVatRate>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
282
+ /** WAREHOUSES */
283
+ getWarehouses(userId: string, organisationId: number, params?: MinimaxSearchParams<MinimaxWarehouse>): Promise<MinimaxSearchResult<MinimaxWarehouse>>;
284
+ newWarehouse(userId: string, organisationId: number, warehouse: MinimaxWarehouse): Promise<{}>;
285
+ deleteWarehouse(userId: string, organisationId: number, warehouseId: number): Promise<{}>;
286
+ getWarehouse(userId: string, organisationId: number, warehouseId: number): Promise<MinimaxWarehouse>;
287
+ updateWarehouse(userId: string, organisationId: number, warehouse: MinimaxWarehouse): Promise<{}>;
288
+ getWarehousesForSync(userId: string, organisationId: number, params?: MinimaxSyncSearchParams<MinimaxWarehouse>): Promise<MinimaxSearchResult<MinimaxSyncReference>>;
289
+ }
@@ -1,7 +1,40 @@
1
1
  import IntegrationsBaseClient from "../integrationsBaseClient";
2
- import { PaymentProvider, GetPaymentLinkOptions } from "../../types/integrations";
2
+ import { PaymentProvider, Transaction, PaymentAmount } from "../../types/integrations/payments";
3
3
  export default class Payments extends IntegrationsBaseClient {
4
- getTransactions(user: string): Promise<import("axios").AxiosResponse<any, any>>;
5
- settings(provider: PaymentProvider): Promise<import("axios").AxiosResponse<any, any>>;
6
- getPaymentLink(provider: PaymentProvider, user: string, options: GetPaymentLinkOptions): Promise<import("axios").AxiosResponse<any, any>>;
4
+ getTransactions(userId: string, params?: {
5
+ status: string;
6
+ sortBy: string;
7
+ sortDirection: string;
8
+ limit: number;
9
+ page: number;
10
+ }): Promise<{
11
+ transactions: Transaction[];
12
+ totalCount: number;
13
+ currentPage: number;
14
+ pageSize: number;
15
+ }>;
16
+ getTransaction(provider: PaymentProvider, userId: string, transactionId: string): Promise<Transaction>;
17
+ settings(provider: PaymentProvider): Promise<{
18
+ merchant_key: string;
19
+ authenticity_token: string;
20
+ }>;
21
+ deactivatePaymentLink(provider: PaymentProvider, user: string, transactionId: string): Promise<import("axios").AxiosResponse<any, any>>;
22
+ voidTransaction(provider: PaymentProvider, user: string, transactionId: string): Promise<import("axios").AxiosResponse<any, any>>;
23
+ refund(provider: PaymentProvider, user: string, transactionId: string): Promise<import("axios").AxiosResponse<any, any>>;
24
+ getPaymentLink(provider: PaymentProvider, user: string, options: PaymentAmount & {
25
+ description: string;
26
+ token?: string;
27
+ isTokenRequest?: boolean;
28
+ redirectUrl?: string;
29
+ lang?: "en" | "es" | "ba" | "hr";
30
+ }): Promise<import("axios").AxiosResponse<any, any>>;
31
+ getTokenRequestLink(provider: PaymentProvider, user: string, options: {
32
+ description: string;
33
+ redirectUrl?: string;
34
+ lang?: "en" | "es" | "ba" | "hr";
35
+ }): Promise<import("axios").AxiosResponse<any, any>>;
36
+ directPayUsingToken(provider: PaymentProvider, user: string, options: PaymentAmount & {
37
+ description: string;
38
+ token: string;
39
+ }): Promise<import("axios").AxiosResponse<any, any>>;
7
40
  }
@@ -3,6 +3,7 @@ import DMS from "./integrations/dms";
3
3
  import VPFR from "./integrations/vpfr";
4
4
  import IntegrationsBaseClient from "./integrationsBaseClient";
5
5
  import Payments from "./integrations/payments";
6
+ import Minimax from "./integrations/minimax";
6
7
  export default class Integrations extends IntegrationsBaseClient {
7
8
  private integrations;
8
9
  constructor(options?: {
@@ -15,6 +16,7 @@ export default class Integrations extends IntegrationsBaseClient {
15
16
  getVPFR(): VPFR;
16
17
  getInvoicing(): Invoicing;
17
18
  getPayments(): Payments;
19
+ getMinimax(): Minimax;
18
20
  isInstalled(id: string): Promise<boolean>;
19
21
  getInterfaceOf(id: string): any;
20
22
  }