@ptkl/sdk 0.10.1 → 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/index.cjs.js +813 -8
- package/dist/index.esm.js +813 -8
- package/dist/index.iife.js +813 -8
- package/dist/types/api/componentUtils.d.ts +4 -2
- package/dist/types/api/integrations/dms.d.ts +11 -1
- package/dist/types/api/integrations/minimax.d.ts +289 -0
- package/dist/types/api/integrations/payments.d.ts +37 -4
- package/dist/types/api/integrations.d.ts +2 -0
- package/dist/types/types/component.d.ts +35 -1
- package/dist/types/types/integrations.d.ts +114 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1343,6 +1343,38 @@ class DMS extends IntegrationsBaseClient {
|
|
|
1343
1343
|
async dirs(data) {
|
|
1344
1344
|
return await this.request("POST", `media/library/dirs`, { data });
|
|
1345
1345
|
}
|
|
1346
|
+
// ===================================================================
|
|
1347
|
+
// Document Methods
|
|
1348
|
+
// ===================================================================
|
|
1349
|
+
async createDocument(payload) {
|
|
1350
|
+
return this.requestv2('POST', 'documents/document', { data: payload });
|
|
1351
|
+
}
|
|
1352
|
+
async getDocument(path) {
|
|
1353
|
+
return this.requestv2('GET', `documents/document/${path}`);
|
|
1354
|
+
}
|
|
1355
|
+
async getDocumentRaw(path) {
|
|
1356
|
+
return this.requestv2('GET', `documents/document/${path}`, {
|
|
1357
|
+
headers: { Accept: 'application/pdoc' }
|
|
1358
|
+
});
|
|
1359
|
+
}
|
|
1360
|
+
async updateDocument(payload) {
|
|
1361
|
+
return this.requestv2('PATCH', 'documents/document', { data: payload });
|
|
1362
|
+
}
|
|
1363
|
+
async deleteDocument(path) {
|
|
1364
|
+
return this.requestv2('DELETE', `documents/document/${path}`);
|
|
1365
|
+
}
|
|
1366
|
+
async listDocuments(params) {
|
|
1367
|
+
return this.requestv2('GET', 'documents/list', { params });
|
|
1368
|
+
}
|
|
1369
|
+
async listDeletedDocuments(params) {
|
|
1370
|
+
return this.requestv2('GET', 'documents/list/__deleted__', { params });
|
|
1371
|
+
}
|
|
1372
|
+
async restoreDocument(payload) {
|
|
1373
|
+
return this.requestv2('POST', 'documents/restore', { data: payload });
|
|
1374
|
+
}
|
|
1375
|
+
async createDocumentComment(payload) {
|
|
1376
|
+
return this.requestv2('POST', 'documents/document/comment', { data: payload });
|
|
1377
|
+
}
|
|
1346
1378
|
async fillPdf(data) {
|
|
1347
1379
|
const { input_path, output_path, output_pdf = false, output_type, output_file_name, replace, form_data, forms } = data;
|
|
1348
1380
|
const responseType = output_pdf ? 'arraybuffer' : 'json';
|
|
@@ -1828,6 +1860,13 @@ class DMS extends IntegrationsBaseClient {
|
|
|
1828
1860
|
...params
|
|
1829
1861
|
});
|
|
1830
1862
|
}
|
|
1863
|
+
async requestv2(method, endpoint, params) {
|
|
1864
|
+
return await this.client.request({
|
|
1865
|
+
method,
|
|
1866
|
+
url: `/v2/dms/${endpoint}`,
|
|
1867
|
+
...params
|
|
1868
|
+
});
|
|
1869
|
+
}
|
|
1831
1870
|
async requestv1(method, endpoint, params) {
|
|
1832
1871
|
return await this.client.request({
|
|
1833
1872
|
method: method,
|
|
@@ -1875,19 +1914,781 @@ class VPFR extends IntegrationsBaseClient {
|
|
|
1875
1914
|
}
|
|
1876
1915
|
|
|
1877
1916
|
class Payments extends IntegrationsBaseClient {
|
|
1878
|
-
async getTransactions(
|
|
1879
|
-
return await this.client.get(`/karadjordje/v1/payment/${
|
|
1917
|
+
async getTransactions(userId, params) {
|
|
1918
|
+
return await this.client.get(`/karadjordje/v1/payment/${userId}/list`, {
|
|
1919
|
+
params,
|
|
1920
|
+
});
|
|
1921
|
+
}
|
|
1922
|
+
async getTransaction(provider, userId, transactionId) {
|
|
1923
|
+
return await this.client.get(`/karadjordje/v1/payment/${provider}/${userId}/getTransaction`, {
|
|
1924
|
+
params: { transactionId },
|
|
1925
|
+
});
|
|
1880
1926
|
}
|
|
1881
1927
|
async settings(provider) {
|
|
1882
1928
|
return await this.client.get(`/karadjordje/v1/payment/${provider}/settings`);
|
|
1883
1929
|
}
|
|
1930
|
+
async deactivatePaymentLink(provider, user, transactionId) {
|
|
1931
|
+
return await this.client.post(`/karadjordje/v1/payment/${provider}/${user}/deactivate/${transactionId}`);
|
|
1932
|
+
}
|
|
1933
|
+
async voidTransaction(provider, user, transactionId) {
|
|
1934
|
+
return await this.client.post(`/karadjordje/v1/payment/${provider}/${user}/void/${transactionId}`);
|
|
1935
|
+
}
|
|
1936
|
+
async refund(provider, user, transactionId) {
|
|
1937
|
+
return await this.client.post(`/karadjordje/v1/payment/${provider}/${user}/refund/${transactionId}`);
|
|
1938
|
+
}
|
|
1884
1939
|
async getPaymentLink(provider, user, options) {
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1940
|
+
return await this.client.post(`/karadjordje/v1/payment/${provider}/${user}/getPaymentLink`, options);
|
|
1941
|
+
}
|
|
1942
|
+
async getTokenRequestLink(provider, user, options) {
|
|
1943
|
+
return await this.client.post(`/karadjordje/v1/payment/${provider}/${user}/getTokenRequestLink`, options);
|
|
1944
|
+
}
|
|
1945
|
+
async directPayUsingToken(provider, user, options) {
|
|
1946
|
+
return await this.client.post(`/karadjordje/v1/payment/${provider}/${user}/directPayUsingToken`, options);
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
class Minimax extends IntegrationsBaseClient {
|
|
1951
|
+
async settings() {
|
|
1952
|
+
return await this.client.get(`/karadjordje/v1/minimax/settings`);
|
|
1953
|
+
}
|
|
1954
|
+
async getAccounts(userId, organisationId, params) {
|
|
1955
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/accounts`;
|
|
1956
|
+
return await this.client.get(path, { params });
|
|
1957
|
+
}
|
|
1958
|
+
async getAccount(userId, organisationId, accountId) {
|
|
1959
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/accounts/${accountId}`;
|
|
1960
|
+
return await this.client.get(path);
|
|
1961
|
+
}
|
|
1962
|
+
async getAccountByCode(userId, organisationId, code) {
|
|
1963
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/accounts/code(${code})`;
|
|
1964
|
+
return await this.client.get(path);
|
|
1965
|
+
}
|
|
1966
|
+
async getAccountByContent(userId, organisationId, content) {
|
|
1967
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/accounts/content(${content})`;
|
|
1968
|
+
return await this.client.get(path);
|
|
1969
|
+
}
|
|
1970
|
+
async getAccountsForSync(userId, organisationId, params) {
|
|
1971
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/accounts/synccandidates`;
|
|
1972
|
+
return await this.client.get(path, { params });
|
|
1973
|
+
}
|
|
1974
|
+
/** ADDRESSES */
|
|
1975
|
+
async getAddresses(userId, organisationId, customerId, params) {
|
|
1976
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/addresses`;
|
|
1977
|
+
return await this.client.get(path, { params });
|
|
1978
|
+
}
|
|
1979
|
+
async newAddress(userId, organisationId, customerId, address) {
|
|
1980
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/addresses`;
|
|
1981
|
+
return await this.client.post(path, address);
|
|
1982
|
+
}
|
|
1983
|
+
async deleteAddress(userId, organisationId, customerId, addressId) {
|
|
1984
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/addresses/${addressId}`;
|
|
1985
|
+
return await this.client.delete(path);
|
|
1986
|
+
}
|
|
1987
|
+
async getAddress(userId, organisationId, customerId, addressId) {
|
|
1988
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/addresses/${addressId}`;
|
|
1989
|
+
return await this.client.get(path);
|
|
1990
|
+
}
|
|
1991
|
+
async updateAddress(userId, organisationId, customerId, address) {
|
|
1992
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/addresses/${address.AddressId}`;
|
|
1993
|
+
return await this.client.put(path, address);
|
|
1994
|
+
}
|
|
1995
|
+
async getAddressesForSync(userId, organisationId, customerId, params) {
|
|
1996
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/addresses/synccandidates`;
|
|
1997
|
+
return await this.client.get(path, { params });
|
|
1998
|
+
}
|
|
1999
|
+
/** ANALYTICS */
|
|
2000
|
+
async getAnalytics(userId, organisationId, params) {
|
|
2001
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/analytics`;
|
|
2002
|
+
return await this.client.get(path, { params });
|
|
2003
|
+
}
|
|
2004
|
+
async newAnalytic(userId, organisationId, analytic) {
|
|
2005
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/analytics`;
|
|
2006
|
+
return await this.client.post(path, analytic);
|
|
2007
|
+
}
|
|
2008
|
+
async deleteAnalytic(userId, organisationId, analyticId) {
|
|
2009
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/analytics/${analyticId}`;
|
|
2010
|
+
return await this.client.delete(path);
|
|
2011
|
+
}
|
|
2012
|
+
async getAnalytic(userId, organisationId, analyticId) {
|
|
2013
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/analytics/${analyticId}`;
|
|
2014
|
+
return await this.client.get(path);
|
|
2015
|
+
}
|
|
2016
|
+
async updateAnalytic(userId, organisationId, analytic) {
|
|
2017
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/analytics/${analytic.AnalyticId}`;
|
|
2018
|
+
return await this.client.put(path, analytic);
|
|
2019
|
+
}
|
|
2020
|
+
async getAnalyticsForSync(userId, organisationId, params) {
|
|
2021
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/analytics/synccandidates`;
|
|
2022
|
+
return await this.client.get(path, { params });
|
|
2023
|
+
}
|
|
2024
|
+
/** BANK ACCOUNTS */
|
|
2025
|
+
async getBankAccounts(userId, organisationId, customerId, params) {
|
|
2026
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/bankAccounts`;
|
|
2027
|
+
return await this.client.get(path, { params });
|
|
2028
|
+
}
|
|
2029
|
+
async newBankAccount(userId, organisationId, customerId, bankAccount) {
|
|
2030
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/bankAccounts`;
|
|
2031
|
+
return await this.client.post(path, bankAccount);
|
|
2032
|
+
}
|
|
2033
|
+
async deleteBankAccount(userId, organisationId, customerId, bankAccountId) {
|
|
2034
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/bankAccounts/${bankAccountId}`;
|
|
2035
|
+
return await this.client.delete(path);
|
|
2036
|
+
}
|
|
2037
|
+
async getBankAccount(userId, organisationId, customerId, bankAccountId) {
|
|
2038
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/bankAccounts/${bankAccountId}`;
|
|
2039
|
+
return await this.client.get(path);
|
|
2040
|
+
}
|
|
2041
|
+
async updateBankAccount(userId, organisationId, customerId, bankAccount) {
|
|
2042
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/addresses/${bankAccount.BankAccountId}`;
|
|
2043
|
+
return await this.client.put(path, bankAccount);
|
|
2044
|
+
}
|
|
2045
|
+
async getBankAccountsForSync(userId, organisationId, customerId, params) {
|
|
2046
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/bankAccounts/synccandidates`;
|
|
2047
|
+
return await this.client.get(path, { params });
|
|
2048
|
+
}
|
|
2049
|
+
/** CONTACTS */
|
|
2050
|
+
async getCustomerContacts(userId, organisationId, customerId, params) {
|
|
2051
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/contacts`;
|
|
2052
|
+
return await this.client.get(path, { params });
|
|
2053
|
+
}
|
|
2054
|
+
async newContact(userId, organisationId, customerId, contact) {
|
|
2055
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/contacts`;
|
|
2056
|
+
return await this.client.post(path, contact);
|
|
2057
|
+
}
|
|
2058
|
+
async deleteContact(userId, organisationId, customerId, contactId) {
|
|
2059
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/contacts/${contactId}`;
|
|
2060
|
+
return await this.client.delete(path);
|
|
2061
|
+
}
|
|
2062
|
+
async getContact(userId, organisationId, customerId, contactId) {
|
|
2063
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/contacts/${contactId}`;
|
|
2064
|
+
return await this.client.get(path);
|
|
2065
|
+
}
|
|
2066
|
+
async updateContact(userId, organisationId, customerId, contact) {
|
|
2067
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/addresses/${contact.ContactId}`;
|
|
2068
|
+
return await this.client.put(path, contact);
|
|
2069
|
+
}
|
|
2070
|
+
async getContacts(userId, organisationId, params) {
|
|
2071
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/contacts`;
|
|
2072
|
+
return await this.client.get(path, { params });
|
|
2073
|
+
}
|
|
2074
|
+
async getContactForSync(userId, organisationId, customerId, params) {
|
|
2075
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}/contacts/synccandidates`;
|
|
2076
|
+
return await this.client.get(path, { params });
|
|
2077
|
+
}
|
|
2078
|
+
/** COUNTRIES */
|
|
2079
|
+
async getCountries(userId, organisationId, params) {
|
|
2080
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/countries`;
|
|
2081
|
+
return await this.client.get(path, { params });
|
|
2082
|
+
}
|
|
2083
|
+
async getCountry(userId, organisationId, countryId) {
|
|
2084
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/countries/${countryId}`;
|
|
2085
|
+
return await this.client.get(path);
|
|
2086
|
+
}
|
|
2087
|
+
async getCountryByCode(userId, organisationId, code) {
|
|
2088
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/countries/code(${code})`;
|
|
2089
|
+
return await this.client.get(path);
|
|
2090
|
+
}
|
|
2091
|
+
async getCountriesForSync(userId, organisationId, params) {
|
|
2092
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/countries/synccandidates`;
|
|
2093
|
+
return await this.client.get(path, { params });
|
|
2094
|
+
}
|
|
2095
|
+
/** CURRENCIES */
|
|
2096
|
+
async getCurrencies(userId, organisationId, params) {
|
|
2097
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/currencies`;
|
|
2098
|
+
return await this.client.get(path, { params });
|
|
2099
|
+
}
|
|
2100
|
+
async getCurrency(userId, organisationId, currencyId) {
|
|
2101
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/currencies/${currencyId}`;
|
|
2102
|
+
return await this.client.get(path);
|
|
2103
|
+
}
|
|
2104
|
+
async getCurrencyByDate(userId, organisationId, date) {
|
|
2105
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/currencies/date(${date.toISOString()})`;
|
|
2106
|
+
return await this.client.get(path);
|
|
2107
|
+
}
|
|
2108
|
+
async getCurrencyByCode(userId, organisationId, code) {
|
|
2109
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/currencies/code(${code})`;
|
|
2110
|
+
return await this.client.get(path);
|
|
2111
|
+
}
|
|
2112
|
+
async getCurrenciesForSync(userId, organisationId, params) {
|
|
2113
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/currencies/synccandidates`;
|
|
2114
|
+
return await this.client.get(path, { params });
|
|
2115
|
+
}
|
|
2116
|
+
/** CUSTOMERS */
|
|
2117
|
+
async getCustomers(userId, organisationId, params) {
|
|
2118
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers`;
|
|
2119
|
+
return await this.client.get(path, { params });
|
|
2120
|
+
}
|
|
2121
|
+
async newCustomer(userId, organisationId, customer) {
|
|
2122
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers`;
|
|
2123
|
+
return await this.client.post(path, customer);
|
|
2124
|
+
}
|
|
2125
|
+
async deleteCusomter(userId, organisationId, customerId) {
|
|
2126
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}`;
|
|
2127
|
+
return await this.client.delete(path);
|
|
2128
|
+
}
|
|
2129
|
+
async getCustomer(userId, organisationId, customerId) {
|
|
2130
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customerId}`;
|
|
2131
|
+
return await this.client.get(path);
|
|
2132
|
+
}
|
|
2133
|
+
async updateCustomer(userId, organisationId, customer) {
|
|
2134
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/${customer.CustomerId}`;
|
|
2135
|
+
return await this.client.put(path, customer);
|
|
2136
|
+
}
|
|
2137
|
+
async getCustomerByCode(userId, organisationId, code) {
|
|
2138
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/code(${code})`;
|
|
2139
|
+
return await this.client.get(path);
|
|
2140
|
+
}
|
|
2141
|
+
async newCustomerByTaxNumber(userId, organisationId, taxNumber) {
|
|
2142
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/addbytaxnumber(${taxNumber})`;
|
|
2143
|
+
return await this.client.post(path, {});
|
|
2144
|
+
}
|
|
2145
|
+
async getCustomersForSync(userId, organisationId, params) {
|
|
2146
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/customers/synccandidates`;
|
|
2147
|
+
return await this.client.get(path, { params });
|
|
2148
|
+
}
|
|
2149
|
+
/** DASHBOARDS */
|
|
2150
|
+
async getDashboardsData(userId, organisationId) {
|
|
2151
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/dashboards`;
|
|
2152
|
+
return await this.client.get(path);
|
|
2153
|
+
}
|
|
2154
|
+
/** DOCUMENTS */
|
|
2155
|
+
async getDocuments(userId, organisationId, params) {
|
|
2156
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/documents`;
|
|
2157
|
+
return await this.client.get(path, { params });
|
|
2158
|
+
}
|
|
2159
|
+
async newDocument(userId, organisationId, document) {
|
|
2160
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/documents`;
|
|
2161
|
+
return await this.client.post(path, document);
|
|
2162
|
+
}
|
|
2163
|
+
async deleteDocument(userId, organisationId, documentId) {
|
|
2164
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/documents/${documentId}`;
|
|
2165
|
+
return await this.client.delete(path);
|
|
2166
|
+
}
|
|
2167
|
+
async getDocument(userId, organisationId, documentId) {
|
|
2168
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/documents/${documentId}`;
|
|
2169
|
+
return await this.client.get(path);
|
|
2170
|
+
}
|
|
2171
|
+
async updateDocument(userId, organisationId, document) {
|
|
2172
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/documents/${document.DocumentId}`;
|
|
2173
|
+
return await this.client.put(path, document);
|
|
2174
|
+
}
|
|
2175
|
+
async deleteDocumentAttachment(userId, organisationId, documentId, documentAttachmentId) {
|
|
2176
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/documents/${documentId}/attachments/${documentAttachmentId}`;
|
|
2177
|
+
return await this.client.delete(path);
|
|
2178
|
+
}
|
|
2179
|
+
async getDocumentAttachment(userId, organisationId, documentId, documentAttachmentId) {
|
|
2180
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/documents/${documentId}/attachments/${documentAttachmentId}`;
|
|
2181
|
+
return await this.client.get(path);
|
|
2182
|
+
}
|
|
2183
|
+
async updateDocumentAttachment(userId, organisationId, documentId, documentAttachment) {
|
|
2184
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/documents/${documentId}/attachments/${documentAttachment.DocumentAttachmentId}`;
|
|
2185
|
+
return await this.client.put(path, documentAttachment);
|
|
2186
|
+
}
|
|
2187
|
+
async newDocumentAttachment(userId, organisationId, documentId, documentAttachment) {
|
|
2188
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/documents/${documentId}/attachments`;
|
|
2189
|
+
return await this.client.post(path, documentAttachment);
|
|
2190
|
+
}
|
|
2191
|
+
async getDocumentsForSync(userId, organisationId, params) {
|
|
2192
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/documents/synccandidates`;
|
|
2193
|
+
return await this.client.get(path, { params });
|
|
2194
|
+
}
|
|
2195
|
+
/** DOCUMENT NUMBERINGS */
|
|
2196
|
+
async getDocumentNumberings(userId, organisationId, params) {
|
|
2197
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/document-numbering`;
|
|
2198
|
+
return await this.client.get(path, { params });
|
|
2199
|
+
}
|
|
2200
|
+
async getDocumentNumbering(userId, organisationId, documentNumberingId) {
|
|
2201
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/document-numbering/${documentNumberingId}`;
|
|
2202
|
+
return await this.client.get(path);
|
|
2203
|
+
}
|
|
2204
|
+
/** EFAKTURA */
|
|
2205
|
+
async getEFakturaList(userId, params) {
|
|
2206
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/efaktura/list`;
|
|
2207
|
+
return await this.client.get(path, { params });
|
|
2208
|
+
}
|
|
2209
|
+
/** EMPLOYEES */
|
|
2210
|
+
async getEmployees(userId, organisationId, params) {
|
|
2211
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/employees`;
|
|
2212
|
+
return await this.client.get(path, { params });
|
|
2213
|
+
}
|
|
2214
|
+
async newEmployee(userId, organisationId, employee) {
|
|
2215
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/employees`;
|
|
2216
|
+
return await this.client.post(path, employee);
|
|
2217
|
+
}
|
|
2218
|
+
async deleteEmployee(userId, organisationId, employeeId) {
|
|
2219
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/employees/${employeeId}`;
|
|
2220
|
+
return await this.client.delete(path);
|
|
2221
|
+
}
|
|
2222
|
+
async getEmployee(userId, organisationId, employeeId) {
|
|
2223
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/employees/${employeeId}`;
|
|
2224
|
+
return await this.client.get(path);
|
|
2225
|
+
}
|
|
2226
|
+
async updateEmployee(userId, organisationId, employee) {
|
|
2227
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/employees/${employee.EmployeeId}`;
|
|
2228
|
+
return await this.client.put(path, employee);
|
|
2229
|
+
}
|
|
2230
|
+
async getEmployeesForSync(userId, organisationId, params) {
|
|
2231
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/employees/synccandidates`;
|
|
2232
|
+
return await this.client.get(path, { params });
|
|
2233
|
+
}
|
|
2234
|
+
/** EXCHANGE RATES */
|
|
2235
|
+
async getExchangeRate(userId, organisationId, currencyId) {
|
|
2236
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/exchange-rates/${currencyId}`;
|
|
2237
|
+
return await this.client.get(path);
|
|
2238
|
+
}
|
|
2239
|
+
async getExchangeRateByCode(userId, organisationId, currencyCode) {
|
|
2240
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/exchange-rates/code(${currencyCode})`;
|
|
2241
|
+
return await this.client.get(path);
|
|
2242
|
+
}
|
|
2243
|
+
/** INBOX */
|
|
2244
|
+
async getInboxes(userId, organisationId, params) {
|
|
2245
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/inbox`;
|
|
2246
|
+
return await this.client.get(path, { params });
|
|
2247
|
+
}
|
|
2248
|
+
async newInbox(userId, organisationId, inbox) {
|
|
2249
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/inbox`;
|
|
2250
|
+
return await this.client.post(path, inbox);
|
|
2251
|
+
}
|
|
2252
|
+
async deleteInbox(userId, organisationId, inboxId) {
|
|
2253
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/inbox/${inboxId}`;
|
|
2254
|
+
return await this.client.delete(path);
|
|
2255
|
+
}
|
|
2256
|
+
async getInbox(userId, organisationId, inboxId) {
|
|
2257
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/inbox/${inboxId}`;
|
|
2258
|
+
return await this.client.get(path);
|
|
2259
|
+
}
|
|
2260
|
+
async newInboxAttachment(userId, organisationId, inboxId, inboxAttachment) {
|
|
2261
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/inbox/${inboxId}`;
|
|
2262
|
+
return await this.client.post(path, inboxAttachment);
|
|
2263
|
+
}
|
|
2264
|
+
async deleteInboxAttachment(userId, organisationId, inboxId, inboxAttachmentId) {
|
|
2265
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/inbox/${inboxId}/attachments/${inboxAttachmentId}`;
|
|
2266
|
+
return await this.client.delete(path);
|
|
2267
|
+
}
|
|
2268
|
+
async actionOnInbox(userId, organisationId, inboxId, action) {
|
|
2269
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/inbox/${inboxId}/actions/${action}`;
|
|
2270
|
+
return await this.client.put(path, {});
|
|
2271
|
+
}
|
|
2272
|
+
/** ISSUED INVOICE */
|
|
2273
|
+
async getIssuedInvoices(userId, organisationId, params) {
|
|
2274
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/issuedinvoices`;
|
|
2275
|
+
return await this.client.get(path, { params });
|
|
2276
|
+
}
|
|
2277
|
+
async newIssuedInvoice(userId, organisationId, issuedInvoice) {
|
|
2278
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/issuedinvoices`;
|
|
2279
|
+
return await this.client.post(path, issuedInvoice);
|
|
2280
|
+
}
|
|
2281
|
+
async deleteIssuedInvoice(userId, organisationId, issuedInvoiceId) {
|
|
2282
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/issuedinvoices/${issuedInvoiceId}`;
|
|
2283
|
+
return await this.client.delete(path);
|
|
2284
|
+
}
|
|
2285
|
+
async getIssuedInvoice(userId, organisationId, issuedInvoiceId) {
|
|
2286
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/issuedinvoices/${issuedInvoiceId}`;
|
|
2287
|
+
return await this.client.get(path);
|
|
2288
|
+
}
|
|
2289
|
+
async updateIssuedInvoice(userId, organisationId, issuedInvoice) {
|
|
2290
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/issuedinvoices/${issuedInvoice.IssuedInvoiceId}`;
|
|
2291
|
+
return await this.client.put(path, issuedInvoice);
|
|
2292
|
+
}
|
|
2293
|
+
async actionOnIssuedInvoice(userId, organisationId, issuedInvoiceId, action) {
|
|
2294
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/issuedinvoices/${issuedInvoiceId}/actions/${action}`;
|
|
2295
|
+
return await this.client.put(path, {});
|
|
2296
|
+
}
|
|
2297
|
+
async getIssuedInvoicesForSync(userId, organisationId, params) {
|
|
2298
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/issuedinvoices/synccandidates`;
|
|
2299
|
+
return await this.client.get(path, { params });
|
|
2300
|
+
}
|
|
2301
|
+
async getPaymentMethodsOnIssuedInvoices(userId, organisationId, params) {
|
|
2302
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/issuedinvoices/paymentmethods`;
|
|
2303
|
+
return await this.client.get(path, { params });
|
|
2304
|
+
}
|
|
2305
|
+
/** ISSUED INVOICE POSTING */
|
|
2306
|
+
async getIssuedInvoicePostings(userId, organisationId, params) {
|
|
2307
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/issuedinvoicepostings`;
|
|
2308
|
+
return await this.client.get(path, { params });
|
|
2309
|
+
}
|
|
2310
|
+
async newIssuedInvoicePosting(userId, organisationId, issuedInvoicePosting) {
|
|
2311
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/issuedinvoicepostings`;
|
|
2312
|
+
return await this.client.post(path, issuedInvoicePosting);
|
|
2313
|
+
}
|
|
2314
|
+
async deleteIssuedInvoicePosting(userId, organisationId, issuedInvoicePostingId) {
|
|
2315
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/issuedinvoicepostings/${issuedInvoicePostingId}`;
|
|
2316
|
+
return await this.client.delete(path);
|
|
2317
|
+
}
|
|
2318
|
+
async getIssuedInvoicePosting(userId, organisationId, issuedInvoicePostingId) {
|
|
2319
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/issuedinvoicepostings/${issuedInvoicePostingId}`;
|
|
2320
|
+
return await this.client.get(path);
|
|
2321
|
+
}
|
|
2322
|
+
async getPaymentMethodsOnIssuedInvoicePostings(userId, organisationId, params) {
|
|
2323
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/issuedinvoicepostings/paymentmethods`;
|
|
2324
|
+
return await this.client.get(path, { params });
|
|
2325
|
+
}
|
|
2326
|
+
async actionOnIssuedInvoicePosting(userId, organisationId, issuedInvoicePostingId, action) {
|
|
2327
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/issuedinvoicepostings/${issuedInvoicePostingId}/actions/${action}`;
|
|
2328
|
+
return await this.client.put(path, {});
|
|
2329
|
+
}
|
|
2330
|
+
/** ITEMS */
|
|
2331
|
+
async getItems(userId, organisationId, params) {
|
|
2332
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/items`;
|
|
2333
|
+
return await this.client.get(path, { params });
|
|
2334
|
+
}
|
|
2335
|
+
async newItem(userId, organisationId, item) {
|
|
2336
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/items`;
|
|
2337
|
+
return await this.client.post(path, item);
|
|
2338
|
+
}
|
|
2339
|
+
async deleteItem(userId, organisationId, itemId) {
|
|
2340
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/items/${itemId}`;
|
|
2341
|
+
return await this.client.delete(path);
|
|
2342
|
+
}
|
|
2343
|
+
async getItem(userId, organisationId, itemId) {
|
|
2344
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/items/${itemId}`;
|
|
2345
|
+
return await this.client.get(path);
|
|
2346
|
+
}
|
|
2347
|
+
async updateItem(userId, organisationId, item) {
|
|
2348
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/items/${item.ItemId}`;
|
|
2349
|
+
return await this.client.put(path, item);
|
|
2350
|
+
}
|
|
2351
|
+
async getItemByCode(userId, organisationId, code) {
|
|
2352
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/items/code(${code})`;
|
|
2353
|
+
return await this.client.get(path);
|
|
2354
|
+
}
|
|
2355
|
+
async getItemSettings(userId, organisationId, code) {
|
|
2356
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/items/settings`;
|
|
2357
|
+
return await this.client.get(path);
|
|
2358
|
+
}
|
|
2359
|
+
async getItemData(userId, organisationId, params) {
|
|
2360
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/items/itemsdata`;
|
|
2361
|
+
return await this.client.get(path, { params });
|
|
2362
|
+
}
|
|
2363
|
+
async getItemPricelist(userId, organisationId, params) {
|
|
2364
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/items/pricelists`;
|
|
2365
|
+
return await this.client.get(path, { params });
|
|
2366
|
+
}
|
|
2367
|
+
async getItemsForSync(userId, organisationId, params) {
|
|
2368
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/items/synccandidates`;
|
|
2369
|
+
return await this.client.get(path, { params });
|
|
2370
|
+
}
|
|
2371
|
+
/** JOURNALS */
|
|
2372
|
+
async getJournals(userId, organisationId, params) {
|
|
2373
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journals`;
|
|
2374
|
+
return await this.client.get(path, { params });
|
|
2375
|
+
}
|
|
2376
|
+
async newJournal(userId, organisationId, journal) {
|
|
2377
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journals`;
|
|
2378
|
+
return await this.client.post(path, journal);
|
|
2379
|
+
}
|
|
2380
|
+
async deleteJournal(userId, organisationId, journalId) {
|
|
2381
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journals/${journalId}`;
|
|
2382
|
+
return await this.client.delete(path);
|
|
2383
|
+
}
|
|
2384
|
+
async getJournal(userId, organisationId, journalId) {
|
|
2385
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journals/${journalId}`;
|
|
2386
|
+
return await this.client.get(path);
|
|
2387
|
+
}
|
|
2388
|
+
async updateJournal(userId, organisationId, journal) {
|
|
2389
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journals/${journal.JournalId}`;
|
|
2390
|
+
return await this.client.put(path, journal);
|
|
2391
|
+
}
|
|
2392
|
+
async deleteJournalVatEntry(userId, organisationId, journalId, vatId) {
|
|
2393
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journals/${journalId}/vat/${vatId}`;
|
|
2394
|
+
return await this.client.delete(path);
|
|
2395
|
+
}
|
|
2396
|
+
async getJournalVatEntry(userId, organisationId, journalId, vatId) {
|
|
2397
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journals/${journalId}/vat/${vatId}`;
|
|
2398
|
+
return await this.client.get(path);
|
|
2399
|
+
}
|
|
2400
|
+
async updateJournalVatEntry(userId, organisationId, journalId, vatEntry) {
|
|
2401
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journals/${journalId}/vat/${vatEntry.VatEntryId}`;
|
|
2402
|
+
return await this.client.put(path, vatEntry);
|
|
2403
|
+
}
|
|
2404
|
+
async newJournalVatEntry(userId, organisationId, journalId, vatEntry) {
|
|
2405
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journals/${journalId}/vat`;
|
|
2406
|
+
return await this.client.post(path, vatEntry);
|
|
2407
|
+
}
|
|
2408
|
+
async getJournalsForSync(userId, organisationId, params) {
|
|
2409
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journals/synccandidates`;
|
|
2410
|
+
return await this.client.get(path, { params });
|
|
2411
|
+
}
|
|
2412
|
+
async getJournalsInVODStandard(userId, organisationId, params) {
|
|
2413
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journals/vodstandard`;
|
|
2414
|
+
return await this.client.get(path, { params });
|
|
2415
|
+
}
|
|
2416
|
+
async getJournalEntries(userId, organisationId, params) {
|
|
2417
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journals/journal-entries`;
|
|
2418
|
+
return await this.client.get(path, { params });
|
|
2419
|
+
}
|
|
2420
|
+
/** JOURNAL TYPES */
|
|
2421
|
+
async getJournalTypes(userId, organisationId, params) {
|
|
2422
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journaltypes`;
|
|
2423
|
+
return await this.client.get(path, { params });
|
|
2424
|
+
}
|
|
2425
|
+
async getJournalType(userId, organisationId, journalTypeId) {
|
|
2426
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journaltypes/${journalTypeId}`;
|
|
2427
|
+
return await this.client.get(path);
|
|
2428
|
+
}
|
|
2429
|
+
async getJournalTypeByCode(userId, organisationId, code) {
|
|
2430
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journaltypes/code(${code})`;
|
|
2431
|
+
return await this.client.get(path);
|
|
2432
|
+
}
|
|
2433
|
+
async getJournalTypesForSync(userId, organisationId, params) {
|
|
2434
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/journaltypes/synccandidates`;
|
|
2435
|
+
return await this.client.get(path, { params });
|
|
2436
|
+
}
|
|
2437
|
+
/** ORDERS */
|
|
2438
|
+
async getOrders(userId, organisationId, params) {
|
|
2439
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/orders`;
|
|
2440
|
+
return await this.client.get(path, { params });
|
|
2441
|
+
}
|
|
2442
|
+
async newOrder(userId, organisationId, order) {
|
|
2443
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/orders`;
|
|
2444
|
+
return await this.client.post(path, order);
|
|
2445
|
+
}
|
|
2446
|
+
async deleteOrder(userId, organisationId, orderId) {
|
|
2447
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/orders/${orderId}`;
|
|
2448
|
+
return await this.client.delete(path);
|
|
2449
|
+
}
|
|
2450
|
+
async getOrder(userId, organisationId, orderId) {
|
|
2451
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/orders/${orderId}`;
|
|
2452
|
+
return await this.client.get(path);
|
|
2453
|
+
}
|
|
2454
|
+
async updateOrder(userId, organisationId, order) {
|
|
2455
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/orders/${order.OrderId}`;
|
|
2456
|
+
return await this.client.put(path, order);
|
|
2457
|
+
}
|
|
2458
|
+
async actionGetOnOrder(userId, organisationId, orderId, action, params) {
|
|
2459
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/orders/${orderId}/actions/${action}`;
|
|
2460
|
+
return await this.client.get(path, { params });
|
|
2461
|
+
}
|
|
2462
|
+
async actionPutOnOrder(userId, organisationId, orderId, action, params) {
|
|
2463
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/orders/${orderId}/actions/${action}`;
|
|
2464
|
+
return await this.client.put(path, {}, { params });
|
|
2465
|
+
}
|
|
2466
|
+
async getOrdersForSync(userId, organisationId, params) {
|
|
2467
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/orders/synccandidates`;
|
|
2468
|
+
return await this.client.get(path, { params });
|
|
2469
|
+
}
|
|
2470
|
+
/** ORGANISATIONS */
|
|
2471
|
+
async getOrganisation(userId, organisationId) {
|
|
2472
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}`;
|
|
2473
|
+
return await this.client.get(path);
|
|
2474
|
+
}
|
|
2475
|
+
async getAllOrganisations(userId, params) {
|
|
2476
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/allOrgs`;
|
|
2477
|
+
return await this.client.get(path, { params });
|
|
2478
|
+
}
|
|
2479
|
+
/** OUTBOX */
|
|
2480
|
+
async getAllOuboxes(userId, organisationId, params) {
|
|
2481
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/outbox`;
|
|
2482
|
+
return await this.client.get(path, { params });
|
|
2483
|
+
}
|
|
2484
|
+
async getOutbox(userId, organisationId, outboxId) {
|
|
2485
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/outbox/${outboxId}`;
|
|
2486
|
+
return await this.client.get(path);
|
|
2487
|
+
}
|
|
2488
|
+
/** PAYMENT METHODS */
|
|
2489
|
+
async getPaymentMethods(userId, organisationId, params) {
|
|
2490
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/paymentmethods`;
|
|
2491
|
+
return await this.client.get(path, { params });
|
|
2492
|
+
}
|
|
2493
|
+
/** PAYROLL SETTINGS */
|
|
2494
|
+
async getPayrollSettingsByCode(userId, code) {
|
|
2495
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/payrollsettings/${code}`;
|
|
2496
|
+
return await this.client.get(path);
|
|
2497
|
+
}
|
|
2498
|
+
/** POSTAL CODE */
|
|
2499
|
+
async getPostalCodesByCountry(userId, organisationId, countryId, params) {
|
|
2500
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/postalcodes/countries/${countryId}`;
|
|
2501
|
+
return await this.client.get(path, { params });
|
|
2502
|
+
}
|
|
2503
|
+
async getPostalCode(userId, organisationId, postalCodeId) {
|
|
2504
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/postalcodes/${postalCodeId}`;
|
|
2505
|
+
return await this.client.get(path);
|
|
2506
|
+
}
|
|
2507
|
+
async getPostalCodesForSync(userId, organisationId, params) {
|
|
2508
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/postalcodes/synccandidates`;
|
|
2509
|
+
return await this.client.get(path, { params });
|
|
2510
|
+
}
|
|
2511
|
+
/** PRODUCT GROUPS */
|
|
2512
|
+
async getProductGroups(userId, organisationId, params) {
|
|
2513
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/productGroups`;
|
|
2514
|
+
return await this.client.get(path, { params });
|
|
2515
|
+
}
|
|
2516
|
+
async newProductGroup(userId, organisationId, productGroup) {
|
|
2517
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/productGroups`;
|
|
2518
|
+
return await this.client.post(path, productGroup);
|
|
2519
|
+
}
|
|
2520
|
+
async deleteProductGroup(userId, organisationId, productGroupId) {
|
|
2521
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/productGroups/${productGroupId}`;
|
|
2522
|
+
return await this.client.delete(path);
|
|
2523
|
+
}
|
|
2524
|
+
async getProductGroup(userId, organisationId, productGroupId) {
|
|
2525
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/productGroups/${productGroupId}`;
|
|
2526
|
+
return await this.client.get(path);
|
|
2527
|
+
}
|
|
2528
|
+
async updateProductGroup(userId, organisationId, productGroup) {
|
|
2529
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/productGroups/${productGroup.ProductGroupId}`;
|
|
2530
|
+
return await this.client.put(path, productGroup);
|
|
2531
|
+
}
|
|
2532
|
+
async getProductGroupsForSync(userId, organisationId, params) {
|
|
2533
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/productGroups/synccandidates`;
|
|
2534
|
+
return await this.client.get(path, { params });
|
|
2535
|
+
}
|
|
2536
|
+
/** PURPOSE CODE */
|
|
2537
|
+
async getPurposeCodes(userId, organisationId, params) {
|
|
2538
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/purpose-codes`;
|
|
2539
|
+
return await this.client.get(path, { params });
|
|
2540
|
+
}
|
|
2541
|
+
async getPurposeCode(userId, organisationId, purposeCodeId) {
|
|
2542
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/purpose-codes/${purposeCodeId}`;
|
|
2543
|
+
return await this.client.get(path);
|
|
2544
|
+
}
|
|
2545
|
+
async getPurposeCodeByCode(userId, organisationId, code) {
|
|
2546
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/purpose-codes/code(${code})`;
|
|
2547
|
+
return await this.client.get(path);
|
|
2548
|
+
}
|
|
2549
|
+
async getPurposeCodesForSync(userId, organisationId, params) {
|
|
2550
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/purpose-codes/synccandidates`;
|
|
2551
|
+
return await this.client.get(path, { params });
|
|
2552
|
+
}
|
|
2553
|
+
/** RECEIVED INVOICES */
|
|
2554
|
+
async deleteReceivedInvoice(userId, organisationId, receivedInvoiceId) {
|
|
2555
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/receivedinvoices/${receivedInvoiceId}`;
|
|
2556
|
+
return await this.client.delete(path);
|
|
2557
|
+
}
|
|
2558
|
+
async getReceivedInvoice(userId, organisationId, receivedInvoiceId) {
|
|
2559
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/receivedinvoices/${receivedInvoiceId}`;
|
|
2560
|
+
return await this.client.get(path);
|
|
2561
|
+
}
|
|
2562
|
+
async updateReceivedInvoice(userId, organisationId, receivedInvoice) {
|
|
2563
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/receivedinvoices/${receivedInvoice.ReceivedInvoiceId}`;
|
|
2564
|
+
return await this.client.put(path, receivedInvoice);
|
|
2565
|
+
}
|
|
2566
|
+
async getReceivedInvoices(userId, organisationId, params) {
|
|
2567
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/receivedinvoices`;
|
|
2568
|
+
return await this.client.get(path, { params });
|
|
2569
|
+
}
|
|
2570
|
+
async newReceivedInvoice(userId, organisationId, receivedInvoice) {
|
|
2571
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/receivedinvoices`;
|
|
2572
|
+
return await this.client.post(path, receivedInvoice);
|
|
2573
|
+
}
|
|
2574
|
+
async getReceivedInvoicesAttachments(userId, organisationId, receivedInvoiceId, params) {
|
|
2575
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/receivedinvoices/${receivedInvoiceId}/attachments`;
|
|
2576
|
+
return await this.client.get(path, { params });
|
|
2577
|
+
}
|
|
2578
|
+
async newReceivedInvoiceAttachment(userId, organisationId, receivedInvoiceId, attachment) {
|
|
2579
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/receivedinvoices/${receivedInvoiceId}/attachments`;
|
|
2580
|
+
return await this.client.post(path, attachment);
|
|
2581
|
+
}
|
|
2582
|
+
/** REPORT TEMPLATES */
|
|
2583
|
+
async getReportTemplates(userId, organisationId, params) {
|
|
2584
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/report-templates`;
|
|
2585
|
+
return await this.client.get(path, { params });
|
|
2586
|
+
}
|
|
2587
|
+
async getReportTemplate(userId, organisationId, reportTemplateId) {
|
|
2588
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/report-templates/${reportTemplateId}`;
|
|
2589
|
+
return await this.client.get(path);
|
|
2590
|
+
}
|
|
2591
|
+
async getReportTemplatesForSync(userId, organisationId, params) {
|
|
2592
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/report-templates/synccandidates`;
|
|
2593
|
+
return await this.client.get(path, { params });
|
|
2594
|
+
}
|
|
2595
|
+
/** STOCK */
|
|
2596
|
+
async getStock(userId, organisationId, params) {
|
|
2597
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/stocks`;
|
|
2598
|
+
return await this.client.get(path, { params });
|
|
2599
|
+
}
|
|
2600
|
+
async getStockForItem(userId, organisationId, itemId) {
|
|
2601
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/stocks/${itemId}`;
|
|
2602
|
+
return await this.client.get(path);
|
|
2603
|
+
}
|
|
2604
|
+
/** STOCK ENTRIES */
|
|
2605
|
+
async getStockEntries(userId, organisationId, params) {
|
|
2606
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/stockentry`;
|
|
2607
|
+
return await this.client.get(path, { params });
|
|
2608
|
+
}
|
|
2609
|
+
async newStockEntry(userId, organisationId, stockEntry) {
|
|
2610
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/stockentry`;
|
|
2611
|
+
return await this.client.post(path, stockEntry);
|
|
2612
|
+
}
|
|
2613
|
+
async deleteStockEntry(userId, organisationId, stockEntryId) {
|
|
2614
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/stockentry/${stockEntryId}`;
|
|
2615
|
+
return await this.client.delete(path);
|
|
2616
|
+
}
|
|
2617
|
+
async getStockEntry(userId, organisationId, stockEntryId) {
|
|
2618
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/stockentry/${stockEntryId}`;
|
|
2619
|
+
return await this.client.get(path);
|
|
2620
|
+
}
|
|
2621
|
+
async updateStockEntry(userId, organisationId, stockEntry) {
|
|
2622
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/stockentry/${stockEntry.StockEntryId}`;
|
|
2623
|
+
return await this.client.post(path, stockEntry);
|
|
2624
|
+
}
|
|
2625
|
+
async actionGetOnStockEntry(userId, organisationId, stockEntryId, action, params) {
|
|
2626
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/stockentry/${stockEntryId}/actions/${action}`;
|
|
2627
|
+
return await this.client.get(path, { params });
|
|
2628
|
+
}
|
|
2629
|
+
async actionPutOnStockEntry(userId, organisationId, stockEntryId, action, params) {
|
|
2630
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/stockentry/${stockEntryId}/actions/${action}`;
|
|
2631
|
+
return await this.client.put(path, {}, { params });
|
|
2632
|
+
}
|
|
2633
|
+
/** USERS */
|
|
2634
|
+
async getCurrentUser(userId) {
|
|
2635
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/currentuser/profile`;
|
|
2636
|
+
return await this.client.get(path);
|
|
2637
|
+
}
|
|
2638
|
+
async getCurrentUserOrgs(userId) {
|
|
2639
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/currentuser/orgs`;
|
|
2640
|
+
return await this.client.get(path);
|
|
2641
|
+
}
|
|
2642
|
+
/** VAT ACCOUNTING TYPES */
|
|
2643
|
+
async getVatAccountingTypes(userId, organisationId, params) {
|
|
2644
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/vataccountingtypes`;
|
|
2645
|
+
return await this.client.get(path, { params });
|
|
2646
|
+
}
|
|
2647
|
+
async getVatAccountingTypesForSync(userId, organisationId, params) {
|
|
2648
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/vataccountingtypes/synccandidates`;
|
|
2649
|
+
return await this.client.get(path, { params });
|
|
2650
|
+
}
|
|
2651
|
+
/** VAT RATES */
|
|
2652
|
+
async getVatRates(userId, organisationId, params) {
|
|
2653
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/vatrates`;
|
|
2654
|
+
return await this.client.get(path, { params });
|
|
2655
|
+
}
|
|
2656
|
+
async getVatRate(userId, organisationId, vatRateId) {
|
|
2657
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/vatrates/${vatRateId}`;
|
|
2658
|
+
return await this.client.get(path);
|
|
2659
|
+
}
|
|
2660
|
+
async getVatRateByCode(userId, organisationId, code) {
|
|
2661
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/vatrates/code(${code})`;
|
|
2662
|
+
return await this.client.get(path);
|
|
2663
|
+
}
|
|
2664
|
+
async getVatRatesForSync(userId, organisationId, params) {
|
|
2665
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/vatrates/synccandidates`;
|
|
2666
|
+
return await this.client.get(path, { params });
|
|
2667
|
+
}
|
|
2668
|
+
/** WAREHOUSES */
|
|
2669
|
+
async getWarehouses(userId, organisationId, params) {
|
|
2670
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/warehouses`;
|
|
2671
|
+
return await this.client.get(path, { params });
|
|
2672
|
+
}
|
|
2673
|
+
async newWarehouse(userId, organisationId, warehouse) {
|
|
2674
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/warehouses`;
|
|
2675
|
+
return await this.client.post(path, warehouse);
|
|
2676
|
+
}
|
|
2677
|
+
async deleteWarehouse(userId, organisationId, warehouseId) {
|
|
2678
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/warehouses/${warehouseId}`;
|
|
2679
|
+
return await this.client.delete(path);
|
|
2680
|
+
}
|
|
2681
|
+
async getWarehouse(userId, organisationId, warehouseId) {
|
|
2682
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/warehouses/${warehouseId}`;
|
|
2683
|
+
return await this.client.get(path);
|
|
2684
|
+
}
|
|
2685
|
+
async updateWarehouse(userId, organisationId, warehouse) {
|
|
2686
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/warehouses/${warehouse.WarehouseId}`;
|
|
2687
|
+
return await this.client.put(path, warehouse);
|
|
2688
|
+
}
|
|
2689
|
+
async getWarehousesForSync(userId, organisationId, params) {
|
|
2690
|
+
const path = `/karadjordje/v1/minimax/${userId}/api/orgs/${organisationId}/warehouses/synccandidates`;
|
|
2691
|
+
return await this.client.get(path, { params });
|
|
1891
2692
|
}
|
|
1892
2693
|
}
|
|
1893
2694
|
|
|
@@ -1901,6 +2702,7 @@ class Integrations extends IntegrationsBaseClient {
|
|
|
1901
2702
|
'protokol-dms': new DMS().setClient(this.client),
|
|
1902
2703
|
'serbia-utilities': new SerbiaUtil().setClient(this.client),
|
|
1903
2704
|
'protokol-payments': new Payments().setClient(this.client),
|
|
2705
|
+
'protokol-minimax': new Minimax().setClient(this.client),
|
|
1904
2706
|
};
|
|
1905
2707
|
}
|
|
1906
2708
|
getSerbiaUtilities() {
|
|
@@ -1918,6 +2720,9 @@ class Integrations extends IntegrationsBaseClient {
|
|
|
1918
2720
|
getPayments() {
|
|
1919
2721
|
return this.getInterfaceOf('protokol-payments');
|
|
1920
2722
|
}
|
|
2723
|
+
getMinimax() {
|
|
2724
|
+
return this.getInterfaceOf('protokol-minimax');
|
|
2725
|
+
}
|
|
1921
2726
|
async isInstalled(id) {
|
|
1922
2727
|
const { data } = await this.client.get("/v1/integrations");
|
|
1923
2728
|
return data.find((i) => i.id == id) !== undefined;
|