@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
|
@@ -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<
|
|
4
|
-
create(data: any): Promise<
|
|
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, PDF2HTMLOptions, MediaUploadPayload, MediaUploadBase64Payload } 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
|
*
|
|
@@ -133,6 +133,15 @@ export default class DMS extends IntegrationsBaseClient {
|
|
|
133
133
|
createDir(path: string): Promise<AxiosResponse<any, any>>;
|
|
134
134
|
deleteDir(path: string): Promise<AxiosResponse<any, any>>;
|
|
135
135
|
dirs(data: string): 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>>;
|
|
136
145
|
fillPdf(data: PDFFillOptions): Promise<AxiosResponse<any, any>>;
|
|
137
146
|
/**
|
|
138
147
|
* Convert data between different formats (JSON, CSV, Excel)
|
|
@@ -455,5 +464,6 @@ export default class DMS extends IntegrationsBaseClient {
|
|
|
455
464
|
*/
|
|
456
465
|
excelToCsv(excelData: Blob | ArrayBuffer, options?: ConversionOptions): Promise<AxiosResponse<string>>;
|
|
457
466
|
request(method: string, endpoint: string, params?: any): Promise<AxiosResponse<any, any>>;
|
|
467
|
+
requestv2(method: string, endpoint: string, params?: any): Promise<AxiosResponse<any, any>>;
|
|
458
468
|
requestv1(method: string, endpoint: string, params?: any): Promise<AxiosResponse<any, any>>;
|
|
459
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,
|
|
2
|
+
import { PaymentProvider, Transaction, PaymentAmount } from "../../types/integrations/payments";
|
|
3
3
|
export default class Payments extends IntegrationsBaseClient {
|
|
4
|
-
getTransactions(
|
|
5
|
-
|
|
6
|
-
|
|
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
|
}
|
|
@@ -47,4 +47,38 @@ type UpdateOptions = {
|
|
|
47
47
|
type ModifyOptions = {
|
|
48
48
|
upsert: boolean;
|
|
49
49
|
};
|
|
50
|
-
|
|
50
|
+
type ComponentLabel = {
|
|
51
|
+
locales: Record<string, string>;
|
|
52
|
+
};
|
|
53
|
+
type ComponentWorkspace = {
|
|
54
|
+
uuid: string;
|
|
55
|
+
CreatedAt: string;
|
|
56
|
+
UpdatedAt: string;
|
|
57
|
+
DeletedAt: string | null;
|
|
58
|
+
workspace_uuid: string;
|
|
59
|
+
component_uuid: string;
|
|
60
|
+
};
|
|
61
|
+
type ComponentListItem = {
|
|
62
|
+
uuid: string;
|
|
63
|
+
CreatedAt: string;
|
|
64
|
+
UpdatedAt: string;
|
|
65
|
+
DeletedAt: string | null;
|
|
66
|
+
name: string;
|
|
67
|
+
label: ComponentLabel;
|
|
68
|
+
tag: string;
|
|
69
|
+
icon: string | null;
|
|
70
|
+
is_active: boolean;
|
|
71
|
+
is_public: boolean;
|
|
72
|
+
visible: boolean;
|
|
73
|
+
project_uuid: string;
|
|
74
|
+
scope: string;
|
|
75
|
+
sort: number;
|
|
76
|
+
public_version: string;
|
|
77
|
+
dev_version: string;
|
|
78
|
+
versions: string[] | null;
|
|
79
|
+
dependencies: string[];
|
|
80
|
+
workspaces: ComponentWorkspace[];
|
|
81
|
+
storage_size: number;
|
|
82
|
+
};
|
|
83
|
+
type ComponentListResponse = ComponentListItem[];
|
|
84
|
+
export { FindParams, FindOptions, FindResponse, FindAdvancedParams, FindAggregateParams, Model, UpdateOptions, ModifyOptions, ComponentListResponse, ComponentListItem, ComponentLabel, ComponentWorkspace, };
|
|
@@ -52,7 +52,7 @@ export type PDFFillOptions = {
|
|
|
52
52
|
forms?: PDFFormStructure[] | any;
|
|
53
53
|
};
|
|
54
54
|
export type HTML2PDFOptions = {
|
|
55
|
-
input_html?:
|
|
55
|
+
input_html?: string;
|
|
56
56
|
input_path?: string;
|
|
57
57
|
output_path?: string;
|
|
58
58
|
output_pdf?: boolean;
|
|
@@ -206,3 +206,116 @@ export type MediaUploadBase64Payload = {
|
|
|
206
206
|
/** Array of files with base64-encoded content */
|
|
207
207
|
files: MediaUploadBase64File[];
|
|
208
208
|
};
|
|
209
|
+
/**
|
|
210
|
+
* Filters for document listing endpoints
|
|
211
|
+
*/
|
|
212
|
+
export type DocumentListParams = {
|
|
213
|
+
/** Optional text to search within documents */
|
|
214
|
+
searchText?: string;
|
|
215
|
+
/** Whether to search recursively through directories */
|
|
216
|
+
recursive?: boolean;
|
|
217
|
+
};
|
|
218
|
+
export type DocumentSourceType = "component" | string;
|
|
219
|
+
export type DocumentSource = {
|
|
220
|
+
type: DocumentSourceType;
|
|
221
|
+
value: string;
|
|
222
|
+
label: string;
|
|
223
|
+
tag: string;
|
|
224
|
+
};
|
|
225
|
+
export type DocumentFieldDataMapping = {
|
|
226
|
+
sourceField?: string;
|
|
227
|
+
};
|
|
228
|
+
export type DocumentFieldSource = "text" | "options" | "datepicker" | DocumentSource["tag"];
|
|
229
|
+
export type DocumentField = {
|
|
230
|
+
field: string;
|
|
231
|
+
label?: string | null;
|
|
232
|
+
source: DocumentFieldSource;
|
|
233
|
+
value?: string | number | null;
|
|
234
|
+
format?: string;
|
|
235
|
+
data?: DocumentFieldDataMapping;
|
|
236
|
+
};
|
|
237
|
+
export type DocumentAuditEntry = {
|
|
238
|
+
time: string;
|
|
239
|
+
name?: string;
|
|
240
|
+
uuid?: string;
|
|
241
|
+
};
|
|
242
|
+
export type DocumentVariant = {
|
|
243
|
+
name: string;
|
|
244
|
+
version: number;
|
|
245
|
+
content: string;
|
|
246
|
+
sources?: DocumentSource[];
|
|
247
|
+
fields?: DocumentField[];
|
|
248
|
+
createdBy?: DocumentAuditEntry;
|
|
249
|
+
updatedBy?: DocumentAuditEntry;
|
|
250
|
+
deletedBy?: DocumentAuditEntry;
|
|
251
|
+
};
|
|
252
|
+
export type DocumentResponse = {
|
|
253
|
+
name: string;
|
|
254
|
+
variants: DocumentVariant[];
|
|
255
|
+
createdBy?: DocumentAuditEntry;
|
|
256
|
+
updatedBy?: DocumentAuditEntry;
|
|
257
|
+
deletedBy?: DocumentAuditEntry;
|
|
258
|
+
};
|
|
259
|
+
export type DocumentListItem = {
|
|
260
|
+
name: string;
|
|
261
|
+
createdBy?: DocumentAuditEntry;
|
|
262
|
+
updatedBy?: DocumentAuditEntry;
|
|
263
|
+
deletedBy?: DocumentAuditEntry;
|
|
264
|
+
};
|
|
265
|
+
export type DocumentListResponse = DocumentListItem[];
|
|
266
|
+
/**
|
|
267
|
+
* Payload for creating a document
|
|
268
|
+
*/
|
|
269
|
+
export type DocumentCreatePayload = {
|
|
270
|
+
/** Document path (including directory and filename) */
|
|
271
|
+
path: string;
|
|
272
|
+
/** Document content (plain text or structured) */
|
|
273
|
+
content?: string;
|
|
274
|
+
/** Document variant identifier */
|
|
275
|
+
variant?: string;
|
|
276
|
+
/** Optional document sources metadata */
|
|
277
|
+
sources?: DocumentSource[];
|
|
278
|
+
/** Optional custom fields metadata */
|
|
279
|
+
fields?: DocumentField[];
|
|
280
|
+
};
|
|
281
|
+
/**
|
|
282
|
+
* Payload for updating an existing document
|
|
283
|
+
*/
|
|
284
|
+
export type DocumentUpdatePayload = {
|
|
285
|
+
/** Document path (including directory and filename) */
|
|
286
|
+
path: string;
|
|
287
|
+
/** Variant to update */
|
|
288
|
+
variant?: string;
|
|
289
|
+
/** Current version used for optimistic locking */
|
|
290
|
+
version?: number;
|
|
291
|
+
/** Updated content */
|
|
292
|
+
content?: string;
|
|
293
|
+
/** Updated sources metadata */
|
|
294
|
+
sources?: DocumentSource[];
|
|
295
|
+
/** Updated fields metadata */
|
|
296
|
+
fields?: DocumentField[];
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* Payload for restoring a deleted document
|
|
300
|
+
*/
|
|
301
|
+
export type DocumentRestorePayload = {
|
|
302
|
+
/** Path of the deleted document */
|
|
303
|
+
path: string;
|
|
304
|
+
/** Optional new path to restore to */
|
|
305
|
+
newPath?: string;
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* Payload for creating a document comment
|
|
309
|
+
*/
|
|
310
|
+
export type DocumentCommentPayload = {
|
|
311
|
+
/** Target document path */
|
|
312
|
+
path: string;
|
|
313
|
+
/** Comment body */
|
|
314
|
+
content: string;
|
|
315
|
+
/** Variant the comment belongs to */
|
|
316
|
+
variant?: string;
|
|
317
|
+
/** Comment start position */
|
|
318
|
+
from?: number;
|
|
319
|
+
/** Comment end position */
|
|
320
|
+
to?: number;
|
|
321
|
+
};
|