@bisondesk/documents-sdk 1.0.364 → 1.0.365
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/lib/apis/document-drafts.d.ts +2 -2
- package/lib/apis/document-drafts.d.ts.map +1 -1
- package/lib/apis/document-drafts.js +1 -1
- package/lib/apis/document-drafts.js.map +1 -1
- package/lib/apis/documents.d.ts +5 -2
- package/lib/apis/documents.d.ts.map +1 -1
- package/lib/apis/documents.js +28 -5
- package/lib/apis/documents.js.map +1 -1
- package/lib/types/booking.d.ts +4 -0
- package/lib/types/booking.d.ts.map +1 -1
- package/lib/types/booking.js.map +1 -1
- package/lib/types/document-categories.d.ts +1 -0
- package/lib/types/document-categories.d.ts.map +1 -1
- package/lib/types/document-categories.js.map +1 -1
- package/lib/types/documents.d.ts +0 -3
- package/lib/types/documents.d.ts.map +1 -1
- package/lib/types/documents.js.map +1 -1
- package/lib/types/leasing.d.ts +25 -0
- package/lib/types/leasing.d.ts.map +1 -0
- package/lib/types/leasing.js +9 -0
- package/lib/types/leasing.js.map +1 -0
- package/lib/types/legacy.d.ts +0 -1
- package/lib/types/legacy.d.ts.map +1 -1
- package/lib/types/legacy.js.map +1 -1
- package/lib/types/search.d.ts +4 -0
- package/lib/types/search.d.ts.map +1 -1
- package/lib/types/search.js.map +1 -1
- package/package.json +1 -1
- package/src/apis/document-drafts.ts +3 -3
- package/src/apis/documents.ts +40 -6
- package/src/types/booking.ts +5 -0
- package/src/types/document-categories.ts +1 -0
- package/src/types/documents.ts +3 -4
- package/src/types/leasing.ts +26 -0
- package/src/types/legacy.ts +0 -1
- package/src/types/search.ts +4 -0
- package/tsconfig.tsbuildinfo +1 -1
package/src/types/documents.ts
CHANGED
|
@@ -85,7 +85,6 @@ export type FinanceDocumentV2 = BaseDocument & {
|
|
|
85
85
|
transferDescription?: string; // we ask clients to put this as description of the transfer
|
|
86
86
|
invoiceId?: string; // mandatory in credit notes but forbidden in invoices
|
|
87
87
|
issueDate: string;
|
|
88
|
-
paymentNotes?: string;
|
|
89
88
|
lines: FinanceDocumentLine[];
|
|
90
89
|
accountingLines?: FinanceDocumentLine[];
|
|
91
90
|
notes?: string;
|
|
@@ -108,7 +107,7 @@ export type FinanceDocumentV2 = BaseDocument & {
|
|
|
108
107
|
vatAmount: string;
|
|
109
108
|
};
|
|
110
109
|
|
|
111
|
-
paidAt?: string;
|
|
110
|
+
paidAt?: string; // ONLY for when accounting integration is not used. Otherwise ALWAYS look at the Finance Booking paidAt
|
|
112
111
|
|
|
113
112
|
reportingPeriod?: string;
|
|
114
113
|
reportingYear?: string;
|
|
@@ -283,8 +282,8 @@ export type FinanceDocumentBisondeskSettings = {
|
|
|
283
282
|
};
|
|
284
283
|
|
|
285
284
|
export type FinanceDocumentPayment = { documentId: string } & (
|
|
286
|
-
| { paid: true; paidAt: string
|
|
287
|
-
| { paid: false; paidAt?: undefined
|
|
285
|
+
| { paid: true; paidAt: string }
|
|
286
|
+
| { paid: false; paidAt?: undefined }
|
|
288
287
|
);
|
|
289
288
|
|
|
290
289
|
export enum FinanceDocumentSubtype {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AttachmentValue } from '@bisondesk/commons-sdk/types';
|
|
2
|
+
import { FinanceDocType, FinanceDocumentSubtype } from './documents.js';
|
|
3
|
+
|
|
4
|
+
export type NewExistingLeasingFinanceDocument = {
|
|
5
|
+
id?: undefined;
|
|
6
|
+
type: FinanceDocType.Sale;
|
|
7
|
+
subtype: FinanceDocumentSubtype.Invoice | FinanceDocumentSubtype.CreditNote;
|
|
8
|
+
issueDate: string;
|
|
9
|
+
contractId: string;
|
|
10
|
+
amountExcl: string;
|
|
11
|
+
paidAt?: string;
|
|
12
|
+
dueDate?: string;
|
|
13
|
+
attachment: AttachmentValue;
|
|
14
|
+
invoiceNumber: string;
|
|
15
|
+
vatPercentage: string;
|
|
16
|
+
period: string;
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const LEASING_DOCUMENT_CATEGORY_ID = 'leasing_sale';
|
|
21
|
+
export const LEASING_COST_CENTER_ID = 'leasing_cost_center';
|
|
22
|
+
export enum LeasingFinanceLineCode {
|
|
23
|
+
Residual = 'LEASING_RESIDUAL',
|
|
24
|
+
Deposit = 'LEASING_DEPOSIT',
|
|
25
|
+
Rent = 'LEASING_RENT',
|
|
26
|
+
}
|
package/src/types/legacy.ts
CHANGED
package/src/types/search.ts
CHANGED
|
@@ -50,12 +50,16 @@ export type SearchFinanceDocument = {
|
|
|
50
50
|
|
|
51
51
|
export type SearchAdministrativeDocument = {
|
|
52
52
|
doc: AdministrativeDocument;
|
|
53
|
+
custom: {
|
|
54
|
+
categorySubtype: 'generic' | 'deal';
|
|
55
|
+
};
|
|
53
56
|
};
|
|
54
57
|
|
|
55
58
|
export type RelatedDocumentsRequest = {
|
|
56
59
|
businessEntityId: BusinessEntityIds;
|
|
57
60
|
recordId: string;
|
|
58
61
|
docTypes?: DocumentType[];
|
|
62
|
+
subtype?: 'generic' | 'deal';
|
|
59
63
|
} & PaginatedRequest;
|
|
60
64
|
|
|
61
65
|
export type SearchDocumentDraftDefinitions = {
|