@nice2dev/ui-tools 1.0.10
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/README.md +36 -0
- package/dist/access-control.d.ts +726 -0
- package/dist/access-control.d.ts.map +1 -0
- package/dist/accessibility-i18n.d.ts +1017 -0
- package/dist/accessibility-i18n.d.ts.map +1 -0
- package/dist/ai-assistant.d.ts +263 -0
- package/dist/ai-assistant.d.ts.map +1 -0
- package/dist/ai-playgrounds.d.ts +842 -0
- package/dist/ai-playgrounds.d.ts.map +1 -0
- package/dist/alerting-incidents.d.ts +558 -0
- package/dist/alerting-incidents.d.ts.map +1 -0
- package/dist/api-designer.d.ts +1568 -0
- package/dist/api-designer.d.ts.map +1 -0
- package/dist/api-testing.d.ts +1146 -0
- package/dist/api-testing.d.ts.map +1 -0
- package/dist/apm-profiling.d.ts +656 -0
- package/dist/apm-profiling.d.ts.map +1 -0
- package/dist/artifacts.d.ts +421 -0
- package/dist/artifacts.d.ts.map +1 -0
- package/dist/audit-compliance.d.ts +752 -0
- package/dist/audit-compliance.d.ts.map +1 -0
- package/dist/certificates.d.ts +256 -0
- package/dist/certificates.d.ts.map +1 -0
- package/dist/chart-builder.d.ts +1404 -0
- package/dist/chart-builder.d.ts.map +1 -0
- package/dist/cloud-instances.d.ts +169 -0
- package/dist/cloud-instances.d.ts.map +1 -0
- package/dist/config-management.d.ts +350 -0
- package/dist/config-management.d.ts.map +1 -0
- package/dist/containers.d.ts +256 -0
- package/dist/containers.d.ts.map +1 -0
- package/dist/dashboard-designer.d.ts +1238 -0
- package/dist/dashboard-designer.d.ts.map +1 -0
- package/dist/data-management.d.ts +496 -0
- package/dist/data-management.d.ts.map +1 -0
- package/dist/data-pipeline.d.ts +1105 -0
- package/dist/data-pipeline.d.ts.map +1 -0
- package/dist/data-warehouse.d.ts +1097 -0
- package/dist/data-warehouse.d.ts.map +1 -0
- package/dist/dataset-management.d.ts +782 -0
- package/dist/dataset-management.d.ts.map +1 -0
- package/dist/db-adapters.d.ts +704 -0
- package/dist/db-adapters.d.ts.map +1 -0
- package/dist/db-admin.d.ts +699 -0
- package/dist/db-admin.d.ts.map +1 -0
- package/dist/db-designer.d.ts +366 -0
- package/dist/db-designer.d.ts.map +1 -0
- package/dist/debugger.d.ts +356 -0
- package/dist/debugger.d.ts.map +1 -0
- package/dist/device-management.d.ts +871 -0
- package/dist/device-management.d.ts.map +1 -0
- package/dist/distributed-tracing.d.ts +427 -0
- package/dist/distributed-tracing.d.ts.map +1 -0
- package/dist/dns-management.d.ts +215 -0
- package/dist/dns-management.d.ts.map +1 -0
- package/dist/download-manager.d.ts +271 -0
- package/dist/download-manager.d.ts.map +1 -0
- package/dist/download-torrent.d.ts +1062 -0
- package/dist/download-torrent.d.ts.map +1 -0
- package/dist/edge-computing.d.ts +720 -0
- package/dist/edge-computing.d.ts.map +1 -0
- package/dist/education.d.ts +1135 -0
- package/dist/education.d.ts.map +1 -0
- package/dist/email-template.d.ts +1141 -0
- package/dist/email-template.d.ts.map +1 -0
- package/dist/erp-enterprise.d.ts +1270 -0
- package/dist/erp-enterprise.d.ts.map +1 -0
- package/dist/form-builder.d.ts +1117 -0
- package/dist/form-builder.d.ts.map +1 -0
- package/dist/game-engine-advanced.d.ts +1049 -0
- package/dist/game-engine-advanced.d.ts.map +1 -0
- package/dist/git.d.ts +415 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/hardware-integration.d.ts +966 -0
- package/dist/hardware-integration.d.ts.map +1 -0
- package/dist/iac.d.ts +318 -0
- package/dist/iac.d.ts.map +1 -0
- package/dist/icon-tools.d.ts +1023 -0
- package/dist/icon-tools.d.ts.map +1 -0
- package/dist/ide.d.ts +322 -0
- package/dist/ide.d.ts.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +176 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +1887 -0
- package/dist/index.mjs.map +1 -0
- package/dist/integration-platform.d.ts +857 -0
- package/dist/integration-platform.d.ts.map +1 -0
- package/dist/kubernetes.d.ts +278 -0
- package/dist/kubernetes.d.ts.map +1 -0
- package/dist/life-management.d.ts +1132 -0
- package/dist/life-management.d.ts.map +1 -0
- package/dist/log-management.d.ts +473 -0
- package/dist/log-management.d.ts.map +1 -0
- package/dist/mathematics.d.ts +870 -0
- package/dist/mathematics.d.ts.map +1 -0
- package/dist/message-queue.d.ts +1006 -0
- package/dist/message-queue.d.ts.map +1 -0
- package/dist/metrics-dashboard.d.ts +596 -0
- package/dist/metrics-dashboard.d.ts.map +1 -0
- package/dist/mobile-components.d.ts +766 -0
- package/dist/mobile-components.d.ts.map +1 -0
- package/dist/model-deployment.d.ts +787 -0
- package/dist/model-deployment.d.ts.map +1 -0
- package/dist/model-registry.d.ts +740 -0
- package/dist/model-registry.d.ts.map +1 -0
- package/dist/model-training.d.ts +706 -0
- package/dist/model-training.d.ts.map +1 -0
- package/dist/network-config.d.ts +334 -0
- package/dist/network-config.d.ts.map +1 -0
- package/dist/network-monitoring.d.ts +291 -0
- package/dist/network-monitoring.d.ts.map +1 -0
- package/dist/pdf-tools.d.ts +1003 -0
- package/dist/pdf-tools.d.ts.map +1 -0
- package/dist/pipelines.d.ts +250 -0
- package/dist/pipelines.d.ts.map +1 -0
- package/dist/remote-desktop.d.ts +207 -0
- package/dist/remote-desktop.d.ts.map +1 -0
- package/dist/report-designer.d.ts +1153 -0
- package/dist/report-designer.d.ts.map +1 -0
- package/dist/scada-industrial.d.ts +848 -0
- package/dist/scada-industrial.d.ts.map +1 -0
- package/dist/scientific-research.d.ts +1149 -0
- package/dist/scientific-research.d.ts.map +1 -0
- package/dist/secret-management.d.ts +617 -0
- package/dist/secret-management.d.ts.map +1 -0
- package/dist/security-scanning.d.ts +714 -0
- package/dist/security-scanning.d.ts.map +1 -0
- package/dist/self-service-analytics.d.ts +1208 -0
- package/dist/self-service-analytics.d.ts.map +1 -0
- package/dist/sensor-dashboard.d.ts +845 -0
- package/dist/sensor-dashboard.d.ts.map +1 -0
- package/dist/server-management.d.ts +331 -0
- package/dist/server-management.d.ts.map +1 -0
- package/dist/smart-home.d.ts +861 -0
- package/dist/smart-home.d.ts.map +1 -0
- package/dist/spreadsheet.d.ts +1043 -0
- package/dist/spreadsheet.d.ts.map +1 -0
- package/dist/sql-editor.d.ts +402 -0
- package/dist/sql-editor.d.ts.map +1 -0
- package/dist/terminal.d.ts +245 -0
- package/dist/terminal.d.ts.map +1 -0
- package/dist/testing-qa.d.ts +1013 -0
- package/dist/testing-qa.d.ts.map +1 -0
- package/dist/torrent-client.d.ts +298 -0
- package/dist/torrent-client.d.ts.map +1 -0
- package/dist/traceless.d.ts +759 -0
- package/dist/traceless.d.ts.map +1 -0
- package/dist/virtual-machines.d.ts +199 -0
- package/dist/virtual-machines.d.ts.map +1 -0
- package/dist/visual-scripting.d.ts +381 -0
- package/dist/visual-scripting.d.ts.map +1 -0
- package/dist/word-processor.d.ts +1124 -0
- package/dist/word-processor.d.ts.map +1 -0
- package/dist/workspace.d.ts +333 -0
- package/dist/workspace.d.ts.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,1270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file erp-enterprise.ts
|
|
3
|
+
* @module @nice2dev/ui-tools
|
|
4
|
+
* @description PRO-26 — ERP Business Enterprise Modules
|
|
5
|
+
*
|
|
6
|
+
* Types for accounting/finance, HR/payroll, production/manufacturing,
|
|
7
|
+
* warehouse/inventory, and CRM/sales modules.
|
|
8
|
+
*/
|
|
9
|
+
/** Currency */
|
|
10
|
+
export interface ERPCurrency {
|
|
11
|
+
code: string;
|
|
12
|
+
name: string;
|
|
13
|
+
symbol: string;
|
|
14
|
+
decimals: number;
|
|
15
|
+
exchangeRate?: number;
|
|
16
|
+
}
|
|
17
|
+
/** Fiscal period */
|
|
18
|
+
export interface FiscalPeriod {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
startDate: Date;
|
|
22
|
+
endDate: Date;
|
|
23
|
+
status: PeriodStatus;
|
|
24
|
+
year: number;
|
|
25
|
+
quarter?: number;
|
|
26
|
+
month?: number;
|
|
27
|
+
}
|
|
28
|
+
/** Period status */
|
|
29
|
+
export type PeriodStatus = 'open' | 'closed' | 'locked';
|
|
30
|
+
/** Unit of measure */
|
|
31
|
+
export interface UnitOfMeasure {
|
|
32
|
+
code: string;
|
|
33
|
+
name: string;
|
|
34
|
+
type: UOMType;
|
|
35
|
+
baseUnit?: string;
|
|
36
|
+
conversionFactor?: number;
|
|
37
|
+
}
|
|
38
|
+
/** UOM type */
|
|
39
|
+
export type UOMType = 'quantity' | 'weight' | 'volume' | 'length' | 'area' | 'time';
|
|
40
|
+
/** Chart of accounts config */
|
|
41
|
+
export interface ChartOfAccountsConfig {
|
|
42
|
+
structure: AccountStructure;
|
|
43
|
+
segments?: AccountSegment[];
|
|
44
|
+
validation?: AccountValidation;
|
|
45
|
+
templates?: AccountTemplate[];
|
|
46
|
+
}
|
|
47
|
+
/** Account structure */
|
|
48
|
+
export interface AccountStructure {
|
|
49
|
+
levels: number;
|
|
50
|
+
levelDigits: number[];
|
|
51
|
+
separator?: string;
|
|
52
|
+
startingDigit?: Record<AccountType, number>;
|
|
53
|
+
}
|
|
54
|
+
/** Account segment */
|
|
55
|
+
export interface AccountSegment {
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
length: number;
|
|
59
|
+
type: SegmentType;
|
|
60
|
+
values?: SegmentValue[];
|
|
61
|
+
}
|
|
62
|
+
/** Segment type */
|
|
63
|
+
export type SegmentType = 'company' | 'department' | 'cost_center' | 'project' | 'natural_account';
|
|
64
|
+
/** Segment value */
|
|
65
|
+
export interface SegmentValue {
|
|
66
|
+
code: string;
|
|
67
|
+
name: string;
|
|
68
|
+
active?: boolean;
|
|
69
|
+
}
|
|
70
|
+
/** Account validation */
|
|
71
|
+
export interface AccountValidation {
|
|
72
|
+
allowInactive?: boolean;
|
|
73
|
+
requireCostCenter?: boolean;
|
|
74
|
+
requireProject?: boolean;
|
|
75
|
+
}
|
|
76
|
+
/** Account template */
|
|
77
|
+
export type AccountTemplate = 'ifrs' | 'gaap' | 'polish' | 'custom';
|
|
78
|
+
/** Account */
|
|
79
|
+
export interface Account {
|
|
80
|
+
id: string;
|
|
81
|
+
code: string;
|
|
82
|
+
name: string;
|
|
83
|
+
type: AccountType;
|
|
84
|
+
normalBalance: BalanceType;
|
|
85
|
+
parentId?: string;
|
|
86
|
+
level: number;
|
|
87
|
+
postingAllowed: boolean;
|
|
88
|
+
active: boolean;
|
|
89
|
+
currency?: string;
|
|
90
|
+
reconcilable?: boolean;
|
|
91
|
+
taxCode?: string;
|
|
92
|
+
notes?: string;
|
|
93
|
+
}
|
|
94
|
+
/** Account type */
|
|
95
|
+
export type AccountType = 'asset' | 'liability' | 'equity' | 'revenue' | 'expense';
|
|
96
|
+
/** Balance type */
|
|
97
|
+
export type BalanceType = 'debit' | 'credit';
|
|
98
|
+
/** Journal entry */
|
|
99
|
+
export interface JournalEntry {
|
|
100
|
+
id: string;
|
|
101
|
+
number: string;
|
|
102
|
+
date: Date;
|
|
103
|
+
period: string;
|
|
104
|
+
description: string;
|
|
105
|
+
lines: JournalLine[];
|
|
106
|
+
status: EntryStatus;
|
|
107
|
+
source?: EntrySource;
|
|
108
|
+
reference?: string;
|
|
109
|
+
reversing?: boolean;
|
|
110
|
+
reversingDate?: Date;
|
|
111
|
+
createdBy: string;
|
|
112
|
+
createdAt: Date;
|
|
113
|
+
postedBy?: string;
|
|
114
|
+
postedAt?: Date;
|
|
115
|
+
}
|
|
116
|
+
/** Journal line */
|
|
117
|
+
export interface JournalLine {
|
|
118
|
+
id: string;
|
|
119
|
+
lineNumber: number;
|
|
120
|
+
account: string;
|
|
121
|
+
description?: string;
|
|
122
|
+
debit?: number;
|
|
123
|
+
credit?: number;
|
|
124
|
+
currency?: string;
|
|
125
|
+
exchangeRate?: number;
|
|
126
|
+
baseDebit?: number;
|
|
127
|
+
baseCredit?: number;
|
|
128
|
+
costCenter?: string;
|
|
129
|
+
project?: string;
|
|
130
|
+
taxCode?: string;
|
|
131
|
+
dimensions?: Record<string, string>;
|
|
132
|
+
}
|
|
133
|
+
/** Entry status */
|
|
134
|
+
export type EntryStatus = 'draft' | 'pending' | 'posted' | 'reversed' | 'void';
|
|
135
|
+
/** Entry source */
|
|
136
|
+
export type EntrySource = 'manual' | 'invoice' | 'payment' | 'payroll' | 'depreciation' | 'allocation' | 'recurring' | 'closing';
|
|
137
|
+
/** General ledger config */
|
|
138
|
+
export interface GeneralLedgerConfig {
|
|
139
|
+
periods: FiscalPeriod[];
|
|
140
|
+
defaultCurrency: string;
|
|
141
|
+
multiCurrency?: boolean;
|
|
142
|
+
retainedEarningsAccount?: string;
|
|
143
|
+
closingRules?: ClosingRule[];
|
|
144
|
+
}
|
|
145
|
+
/** Closing rule */
|
|
146
|
+
export interface ClosingRule {
|
|
147
|
+
id: string;
|
|
148
|
+
name: string;
|
|
149
|
+
sourceAccounts: string[];
|
|
150
|
+
targetAccount: string;
|
|
151
|
+
type: 'revenue' | 'expense' | 'balance';
|
|
152
|
+
}
|
|
153
|
+
/** Ledger entry */
|
|
154
|
+
export interface LedgerEntry {
|
|
155
|
+
id: string;
|
|
156
|
+
entryId: string;
|
|
157
|
+
lineId: string;
|
|
158
|
+
date: Date;
|
|
159
|
+
period: string;
|
|
160
|
+
account: string;
|
|
161
|
+
description?: string;
|
|
162
|
+
debit?: number;
|
|
163
|
+
credit?: number;
|
|
164
|
+
balance: number;
|
|
165
|
+
currency: string;
|
|
166
|
+
baseDebit?: number;
|
|
167
|
+
baseCredit?: number;
|
|
168
|
+
baseBalance?: number;
|
|
169
|
+
}
|
|
170
|
+
/** Trial balance */
|
|
171
|
+
export interface TrialBalance {
|
|
172
|
+
period: string;
|
|
173
|
+
asOfDate: Date;
|
|
174
|
+
accounts: TrialBalanceRow[];
|
|
175
|
+
totals: TrialBalanceTotals;
|
|
176
|
+
}
|
|
177
|
+
/** Trial balance row */
|
|
178
|
+
export interface TrialBalanceRow {
|
|
179
|
+
accountCode: string;
|
|
180
|
+
accountName: string;
|
|
181
|
+
accountType: AccountType;
|
|
182
|
+
openingDebit: number;
|
|
183
|
+
openingCredit: number;
|
|
184
|
+
periodDebit: number;
|
|
185
|
+
periodCredit: number;
|
|
186
|
+
closingDebit: number;
|
|
187
|
+
closingCredit: number;
|
|
188
|
+
}
|
|
189
|
+
/** Trial balance totals */
|
|
190
|
+
export interface TrialBalanceTotals {
|
|
191
|
+
openingDebit: number;
|
|
192
|
+
openingCredit: number;
|
|
193
|
+
periodDebit: number;
|
|
194
|
+
periodCredit: number;
|
|
195
|
+
closingDebit: number;
|
|
196
|
+
closingCredit: number;
|
|
197
|
+
}
|
|
198
|
+
/** Balance sheet */
|
|
199
|
+
export interface BalanceSheet {
|
|
200
|
+
asOfDate: Date;
|
|
201
|
+
currency: string;
|
|
202
|
+
assets: BalanceSheetSection;
|
|
203
|
+
liabilities: BalanceSheetSection;
|
|
204
|
+
equity: BalanceSheetSection;
|
|
205
|
+
totalAssets: number;
|
|
206
|
+
totalLiabilities: number;
|
|
207
|
+
totalEquity: number;
|
|
208
|
+
}
|
|
209
|
+
/** Balance sheet section */
|
|
210
|
+
export interface BalanceSheetSection {
|
|
211
|
+
items: FinancialLineItem[];
|
|
212
|
+
subtotals?: FinancialSubtotal[];
|
|
213
|
+
total: number;
|
|
214
|
+
}
|
|
215
|
+
/** Financial line item */
|
|
216
|
+
export interface FinancialLineItem {
|
|
217
|
+
accountCode?: string;
|
|
218
|
+
description: string;
|
|
219
|
+
amount: number;
|
|
220
|
+
priorAmount?: number;
|
|
221
|
+
variance?: number;
|
|
222
|
+
variancePercent?: number;
|
|
223
|
+
indent: number;
|
|
224
|
+
isBold?: boolean;
|
|
225
|
+
}
|
|
226
|
+
/** Financial subtotal */
|
|
227
|
+
export interface FinancialSubtotal {
|
|
228
|
+
description: string;
|
|
229
|
+
amount: number;
|
|
230
|
+
priorAmount?: number;
|
|
231
|
+
}
|
|
232
|
+
/** Profit & loss */
|
|
233
|
+
export interface ProfitAndLoss {
|
|
234
|
+
periodStart: Date;
|
|
235
|
+
periodEnd: Date;
|
|
236
|
+
currency: string;
|
|
237
|
+
revenue: PLSection;
|
|
238
|
+
costOfSales?: PLSection;
|
|
239
|
+
grossProfit?: number;
|
|
240
|
+
operatingExpenses: PLSection;
|
|
241
|
+
operatingIncome: number;
|
|
242
|
+
otherIncome?: PLSection;
|
|
243
|
+
otherExpenses?: PLSection;
|
|
244
|
+
incomeBeforeTax: number;
|
|
245
|
+
taxExpense?: number;
|
|
246
|
+
netIncome: number;
|
|
247
|
+
}
|
|
248
|
+
/** P&L section */
|
|
249
|
+
export interface PLSection {
|
|
250
|
+
items: FinancialLineItem[];
|
|
251
|
+
total: number;
|
|
252
|
+
}
|
|
253
|
+
/** Cash flow statement */
|
|
254
|
+
export interface CashFlowStatement {
|
|
255
|
+
periodStart: Date;
|
|
256
|
+
periodEnd: Date;
|
|
257
|
+
currency: string;
|
|
258
|
+
operating: CashFlowSection;
|
|
259
|
+
investing: CashFlowSection;
|
|
260
|
+
financing: CashFlowSection;
|
|
261
|
+
netCashFlow: number;
|
|
262
|
+
openingCash: number;
|
|
263
|
+
closingCash: number;
|
|
264
|
+
}
|
|
265
|
+
/** Cash flow section */
|
|
266
|
+
export interface CashFlowSection {
|
|
267
|
+
items: CashFlowItem[];
|
|
268
|
+
total: number;
|
|
269
|
+
}
|
|
270
|
+
/** Cash flow item */
|
|
271
|
+
export interface CashFlowItem {
|
|
272
|
+
description: string;
|
|
273
|
+
amount: number;
|
|
274
|
+
category?: string;
|
|
275
|
+
}
|
|
276
|
+
/** Invoice */
|
|
277
|
+
export interface Invoice {
|
|
278
|
+
id: string;
|
|
279
|
+
number: string;
|
|
280
|
+
type: InvoiceType;
|
|
281
|
+
status: InvoiceStatus;
|
|
282
|
+
customer?: CustomerRef;
|
|
283
|
+
vendor?: VendorRef;
|
|
284
|
+
date: Date;
|
|
285
|
+
dueDate: Date;
|
|
286
|
+
currency: string;
|
|
287
|
+
exchangeRate?: number;
|
|
288
|
+
lines: InvoiceLine[];
|
|
289
|
+
subtotal: number;
|
|
290
|
+
taxTotal: number;
|
|
291
|
+
total: number;
|
|
292
|
+
amountPaid: number;
|
|
293
|
+
amountDue: number;
|
|
294
|
+
paymentTerms?: string;
|
|
295
|
+
notes?: string;
|
|
296
|
+
eInvoiceData?: EInvoiceData;
|
|
297
|
+
}
|
|
298
|
+
/** Invoice type */
|
|
299
|
+
export type InvoiceType = 'sales' | 'purchase' | 'credit_note' | 'debit_note';
|
|
300
|
+
/** Invoice status */
|
|
301
|
+
export type InvoiceStatus = 'draft' | 'sent' | 'partial' | 'paid' | 'overdue' | 'cancelled';
|
|
302
|
+
/** Invoice line */
|
|
303
|
+
export interface InvoiceLine {
|
|
304
|
+
id: string;
|
|
305
|
+
lineNumber: number;
|
|
306
|
+
item?: string;
|
|
307
|
+
description: string;
|
|
308
|
+
quantity: number;
|
|
309
|
+
unit?: string;
|
|
310
|
+
unitPrice: number;
|
|
311
|
+
discount?: number;
|
|
312
|
+
discountType?: 'percent' | 'amount';
|
|
313
|
+
taxCode?: string;
|
|
314
|
+
taxRate?: number;
|
|
315
|
+
taxAmount: number;
|
|
316
|
+
netAmount: number;
|
|
317
|
+
grossAmount: number;
|
|
318
|
+
account?: string;
|
|
319
|
+
costCenter?: string;
|
|
320
|
+
project?: string;
|
|
321
|
+
}
|
|
322
|
+
/** Customer reference */
|
|
323
|
+
export interface CustomerRef {
|
|
324
|
+
id: string;
|
|
325
|
+
name: string;
|
|
326
|
+
taxId?: string;
|
|
327
|
+
}
|
|
328
|
+
/** Vendor reference */
|
|
329
|
+
export interface VendorRef {
|
|
330
|
+
id: string;
|
|
331
|
+
name: string;
|
|
332
|
+
taxId?: string;
|
|
333
|
+
}
|
|
334
|
+
/** E-invoice data */
|
|
335
|
+
export interface EInvoiceData {
|
|
336
|
+
format: EInvoiceFormat;
|
|
337
|
+
xml?: string;
|
|
338
|
+
ksef?: KSeFData;
|
|
339
|
+
zugferd?: ZUGFeRDData;
|
|
340
|
+
}
|
|
341
|
+
/** E-invoice format */
|
|
342
|
+
export type EInvoiceFormat = 'ksef' | 'zugferd' | 'ubl' | 'facturae';
|
|
343
|
+
/** KSeF data (Poland) */
|
|
344
|
+
export interface KSeFData {
|
|
345
|
+
referenceNumber?: string;
|
|
346
|
+
sessionId?: string;
|
|
347
|
+
sentAt?: Date;
|
|
348
|
+
status?: 'sent' | 'accepted' | 'rejected';
|
|
349
|
+
}
|
|
350
|
+
/** ZUGFeRD data (EU) */
|
|
351
|
+
export interface ZUGFeRDData {
|
|
352
|
+
profile: 'minimum' | 'basic' | 'en16931' | 'extended';
|
|
353
|
+
xml: string;
|
|
354
|
+
}
|
|
355
|
+
/** Bank reconciliation */
|
|
356
|
+
export interface BankReconciliation {
|
|
357
|
+
id: string;
|
|
358
|
+
bankAccountId: string;
|
|
359
|
+
statementDate: Date;
|
|
360
|
+
statementBalance: number;
|
|
361
|
+
ledgerBalance: number;
|
|
362
|
+
adjustedBalance: number;
|
|
363
|
+
reconciledItems: ReconciledItem[];
|
|
364
|
+
unreconciledItems: UnreconciledItem[];
|
|
365
|
+
status: ReconciliationStatus;
|
|
366
|
+
}
|
|
367
|
+
/** Reconciled item */
|
|
368
|
+
export interface ReconciledItem {
|
|
369
|
+
statementLine: BankStatementLine;
|
|
370
|
+
ledgerEntries: string[];
|
|
371
|
+
matchType: MatchType;
|
|
372
|
+
matchDate: Date;
|
|
373
|
+
}
|
|
374
|
+
/** Bank statement line */
|
|
375
|
+
export interface BankStatementLine {
|
|
376
|
+
id: string;
|
|
377
|
+
date: Date;
|
|
378
|
+
description: string;
|
|
379
|
+
reference?: string;
|
|
380
|
+
amount: number;
|
|
381
|
+
balance?: number;
|
|
382
|
+
}
|
|
383
|
+
/** Unreconciled item */
|
|
384
|
+
export interface UnreconciledItem {
|
|
385
|
+
type: 'statement' | 'ledger';
|
|
386
|
+
item: BankStatementLine | LedgerEntry;
|
|
387
|
+
suggestedMatches?: SuggestedMatch[];
|
|
388
|
+
}
|
|
389
|
+
/** Suggested match */
|
|
390
|
+
export interface SuggestedMatch {
|
|
391
|
+
targetId: string;
|
|
392
|
+
confidence: number;
|
|
393
|
+
reason: string;
|
|
394
|
+
}
|
|
395
|
+
/** Match type */
|
|
396
|
+
export type MatchType = 'auto' | 'manual' | 'rule';
|
|
397
|
+
/** Reconciliation status */
|
|
398
|
+
export type ReconciliationStatus = 'draft' | 'in_progress' | 'completed';
|
|
399
|
+
/** Fixed asset */
|
|
400
|
+
export interface FixedAsset {
|
|
401
|
+
id: string;
|
|
402
|
+
number: string;
|
|
403
|
+
name: string;
|
|
404
|
+
description?: string;
|
|
405
|
+
category: string;
|
|
406
|
+
location?: string;
|
|
407
|
+
status: AssetStatus;
|
|
408
|
+
acquisitionDate: Date;
|
|
409
|
+
acquisitionCost: number;
|
|
410
|
+
residualValue: number;
|
|
411
|
+
usefulLife: number;
|
|
412
|
+
depreciationMethod: DepreciationMethod;
|
|
413
|
+
depreciationAccount?: string;
|
|
414
|
+
accumulatedDepreciation: number;
|
|
415
|
+
netBookValue: number;
|
|
416
|
+
lastDepreciationDate?: Date;
|
|
417
|
+
disposalDate?: Date;
|
|
418
|
+
disposalMethod?: DisposalMethod;
|
|
419
|
+
disposalValue?: number;
|
|
420
|
+
}
|
|
421
|
+
/** Asset status */
|
|
422
|
+
export type AssetStatus = 'active' | 'fully_depreciated' | 'disposed' | 'under_construction';
|
|
423
|
+
/** Depreciation method */
|
|
424
|
+
export type DepreciationMethod = 'straight_line' | 'declining_balance' | 'units_of_production' | 'sum_of_years';
|
|
425
|
+
/** Disposal method */
|
|
426
|
+
export type DisposalMethod = 'sale' | 'scrap' | 'donation';
|
|
427
|
+
/** Budget */
|
|
428
|
+
export interface Budget {
|
|
429
|
+
id: string;
|
|
430
|
+
name: string;
|
|
431
|
+
fiscalYear: number;
|
|
432
|
+
type: BudgetType;
|
|
433
|
+
status: BudgetStatus;
|
|
434
|
+
lines: BudgetLine[];
|
|
435
|
+
version?: number;
|
|
436
|
+
approvedBy?: string;
|
|
437
|
+
approvedAt?: Date;
|
|
438
|
+
}
|
|
439
|
+
/** Budget type */
|
|
440
|
+
export type BudgetType = 'expense' | 'revenue' | 'capital';
|
|
441
|
+
/** Budget status */
|
|
442
|
+
export type BudgetStatus = 'draft' | 'submitted' | 'approved' | 'rejected';
|
|
443
|
+
/** Budget line */
|
|
444
|
+
export interface BudgetLine {
|
|
445
|
+
id: string;
|
|
446
|
+
account: string;
|
|
447
|
+
costCenter?: string;
|
|
448
|
+
project?: string;
|
|
449
|
+
periods: BudgetPeriod[];
|
|
450
|
+
total: number;
|
|
451
|
+
}
|
|
452
|
+
/** Budget period */
|
|
453
|
+
export interface BudgetPeriod {
|
|
454
|
+
period: string;
|
|
455
|
+
amount: number;
|
|
456
|
+
actual?: number;
|
|
457
|
+
variance?: number;
|
|
458
|
+
}
|
|
459
|
+
/** Employee */
|
|
460
|
+
export interface Employee {
|
|
461
|
+
id: string;
|
|
462
|
+
employeeNumber: string;
|
|
463
|
+
firstName: string;
|
|
464
|
+
lastName: string;
|
|
465
|
+
email: string;
|
|
466
|
+
phone?: string;
|
|
467
|
+
department: string;
|
|
468
|
+
position: string;
|
|
469
|
+
manager?: string;
|
|
470
|
+
hireDate: Date;
|
|
471
|
+
terminationDate?: Date;
|
|
472
|
+
status: EmployeeStatus;
|
|
473
|
+
employmentType: EmploymentType;
|
|
474
|
+
workSchedule?: string;
|
|
475
|
+
location?: string;
|
|
476
|
+
compensation?: Compensation;
|
|
477
|
+
benefits?: BenefitEnrollment[];
|
|
478
|
+
documents?: EmployeeDocument[];
|
|
479
|
+
emergencyContacts?: EmergencyContact[];
|
|
480
|
+
}
|
|
481
|
+
/** Employee status */
|
|
482
|
+
export type EmployeeStatus = 'active' | 'on_leave' | 'terminated' | 'probation';
|
|
483
|
+
/** Employment type */
|
|
484
|
+
export type EmploymentType = 'full_time' | 'part_time' | 'contract' | 'intern' | 'temporary';
|
|
485
|
+
/** Compensation */
|
|
486
|
+
export interface Compensation {
|
|
487
|
+
type: CompensationType;
|
|
488
|
+
amount: number;
|
|
489
|
+
currency: string;
|
|
490
|
+
frequency: PayFrequency;
|
|
491
|
+
effectiveDate: Date;
|
|
492
|
+
taxClass?: string;
|
|
493
|
+
deductions?: Deduction[];
|
|
494
|
+
allowances?: Allowance[];
|
|
495
|
+
}
|
|
496
|
+
/** Compensation type */
|
|
497
|
+
export type CompensationType = 'salary' | 'hourly' | 'commission';
|
|
498
|
+
/** Pay frequency */
|
|
499
|
+
export type PayFrequency = 'weekly' | 'biweekly' | 'semimonthly' | 'monthly';
|
|
500
|
+
/** Deduction */
|
|
501
|
+
export interface Deduction {
|
|
502
|
+
id: string;
|
|
503
|
+
name: string;
|
|
504
|
+
type: DeductionType;
|
|
505
|
+
amount?: number;
|
|
506
|
+
percentage?: number;
|
|
507
|
+
preTax?: boolean;
|
|
508
|
+
}
|
|
509
|
+
/** Deduction type */
|
|
510
|
+
export type DeductionType = 'tax' | 'social_security' | 'health_insurance' | 'retirement' | 'union_dues' | 'garnishment' | 'other';
|
|
511
|
+
/** Allowance */
|
|
512
|
+
export interface Allowance {
|
|
513
|
+
id: string;
|
|
514
|
+
name: string;
|
|
515
|
+
type: AllowanceType;
|
|
516
|
+
amount: number;
|
|
517
|
+
taxable?: boolean;
|
|
518
|
+
}
|
|
519
|
+
/** Allowance type */
|
|
520
|
+
export type AllowanceType = 'housing' | 'transport' | 'meal' | 'phone' | 'other';
|
|
521
|
+
/** Benefit enrollment */
|
|
522
|
+
export interface BenefitEnrollment {
|
|
523
|
+
benefitId: string;
|
|
524
|
+
planId: string;
|
|
525
|
+
startDate: Date;
|
|
526
|
+
endDate?: Date;
|
|
527
|
+
employeeContribution?: number;
|
|
528
|
+
employerContribution?: number;
|
|
529
|
+
dependents?: Dependent[];
|
|
530
|
+
}
|
|
531
|
+
/** Dependent */
|
|
532
|
+
export interface Dependent {
|
|
533
|
+
name: string;
|
|
534
|
+
relationship: DependentRelationship;
|
|
535
|
+
dateOfBirth?: Date;
|
|
536
|
+
}
|
|
537
|
+
/** Dependent relationship */
|
|
538
|
+
export type DependentRelationship = 'spouse' | 'child' | 'domestic_partner' | 'other';
|
|
539
|
+
/** Employee document */
|
|
540
|
+
export interface EmployeeDocument {
|
|
541
|
+
id: string;
|
|
542
|
+
type: DocumentType;
|
|
543
|
+
name: string;
|
|
544
|
+
url: string;
|
|
545
|
+
uploadedAt: Date;
|
|
546
|
+
expiresAt?: Date;
|
|
547
|
+
}
|
|
548
|
+
/** Document type */
|
|
549
|
+
export type DocumentType = 'contract' | 'id' | 'resume' | 'certificate' | 'performance_review' | 'other';
|
|
550
|
+
/** Emergency contact */
|
|
551
|
+
export interface EmergencyContact {
|
|
552
|
+
name: string;
|
|
553
|
+
relationship: string;
|
|
554
|
+
phone: string;
|
|
555
|
+
email?: string;
|
|
556
|
+
}
|
|
557
|
+
/** Payroll run */
|
|
558
|
+
export interface PayrollRun {
|
|
559
|
+
id: string;
|
|
560
|
+
periodStart: Date;
|
|
561
|
+
periodEnd: Date;
|
|
562
|
+
payDate: Date;
|
|
563
|
+
status: PayrollStatus;
|
|
564
|
+
employees: PayrollEmployee[];
|
|
565
|
+
totals: PayrollTotals;
|
|
566
|
+
createdBy: string;
|
|
567
|
+
createdAt: Date;
|
|
568
|
+
approvedBy?: string;
|
|
569
|
+
approvedAt?: Date;
|
|
570
|
+
paidAt?: Date;
|
|
571
|
+
}
|
|
572
|
+
/** Payroll status */
|
|
573
|
+
export type PayrollStatus = 'draft' | 'calculated' | 'approved' | 'paid' | 'cancelled';
|
|
574
|
+
/** Payroll employee */
|
|
575
|
+
export interface PayrollEmployee {
|
|
576
|
+
employeeId: string;
|
|
577
|
+
grossPay: number;
|
|
578
|
+
deductions: PayrollDeduction[];
|
|
579
|
+
allowances: PayrollAllowance[];
|
|
580
|
+
taxes: PayrollTax[];
|
|
581
|
+
netPay: number;
|
|
582
|
+
paymentMethod?: PaymentMethod;
|
|
583
|
+
}
|
|
584
|
+
/** Payroll deduction */
|
|
585
|
+
export interface PayrollDeduction {
|
|
586
|
+
type: DeductionType;
|
|
587
|
+
name: string;
|
|
588
|
+
amount: number;
|
|
589
|
+
}
|
|
590
|
+
/** Payroll allowance */
|
|
591
|
+
export interface PayrollAllowance {
|
|
592
|
+
type: AllowanceType;
|
|
593
|
+
name: string;
|
|
594
|
+
amount: number;
|
|
595
|
+
}
|
|
596
|
+
/** Payroll tax */
|
|
597
|
+
export interface PayrollTax {
|
|
598
|
+
type: string;
|
|
599
|
+
name: string;
|
|
600
|
+
taxableAmount: number;
|
|
601
|
+
taxAmount: number;
|
|
602
|
+
rate?: number;
|
|
603
|
+
}
|
|
604
|
+
/** Payment method */
|
|
605
|
+
export type PaymentMethod = 'bank_transfer' | 'check' | 'cash';
|
|
606
|
+
/** Payroll totals */
|
|
607
|
+
export interface PayrollTotals {
|
|
608
|
+
employeeCount: number;
|
|
609
|
+
totalGross: number;
|
|
610
|
+
totalDeductions: number;
|
|
611
|
+
totalAllowances: number;
|
|
612
|
+
totalTaxes: number;
|
|
613
|
+
totalNet: number;
|
|
614
|
+
employerContributions: number;
|
|
615
|
+
}
|
|
616
|
+
/** Leave request */
|
|
617
|
+
export interface LeaveRequest {
|
|
618
|
+
id: string;
|
|
619
|
+
employeeId: string;
|
|
620
|
+
type: LeaveType;
|
|
621
|
+
startDate: Date;
|
|
622
|
+
endDate: Date;
|
|
623
|
+
days: number;
|
|
624
|
+
status: LeaveStatus;
|
|
625
|
+
reason?: string;
|
|
626
|
+
attachments?: string[];
|
|
627
|
+
approver?: string;
|
|
628
|
+
approvedAt?: Date;
|
|
629
|
+
comments?: string;
|
|
630
|
+
}
|
|
631
|
+
/** Leave type */
|
|
632
|
+
export type LeaveType = 'vacation' | 'sick' | 'personal' | 'parental' | 'bereavement' | 'unpaid';
|
|
633
|
+
/** Leave status */
|
|
634
|
+
export type LeaveStatus = 'pending' | 'approved' | 'rejected' | 'cancelled';
|
|
635
|
+
/** Time entry */
|
|
636
|
+
export interface TimeEntry {
|
|
637
|
+
id: string;
|
|
638
|
+
employeeId: string;
|
|
639
|
+
date: Date;
|
|
640
|
+
project?: string;
|
|
641
|
+
task?: string;
|
|
642
|
+
hours: number;
|
|
643
|
+
overtime?: number;
|
|
644
|
+
notes?: string;
|
|
645
|
+
status: TimeEntryStatus;
|
|
646
|
+
approvedBy?: string;
|
|
647
|
+
}
|
|
648
|
+
/** Time entry status */
|
|
649
|
+
export type TimeEntryStatus = 'draft' | 'submitted' | 'approved' | 'rejected';
|
|
650
|
+
/** Shift */
|
|
651
|
+
export interface Shift {
|
|
652
|
+
id: string;
|
|
653
|
+
name: string;
|
|
654
|
+
startTime: string;
|
|
655
|
+
endTime: string;
|
|
656
|
+
breakDuration?: number;
|
|
657
|
+
color?: string;
|
|
658
|
+
}
|
|
659
|
+
/** Shift assignment */
|
|
660
|
+
export interface ShiftAssignment {
|
|
661
|
+
id: string;
|
|
662
|
+
employeeId: string;
|
|
663
|
+
shiftId: string;
|
|
664
|
+
date: Date;
|
|
665
|
+
status: ShiftAssignmentStatus;
|
|
666
|
+
swapRequested?: boolean;
|
|
667
|
+
notes?: string;
|
|
668
|
+
}
|
|
669
|
+
/** Shift assignment status */
|
|
670
|
+
export type ShiftAssignmentStatus = 'scheduled' | 'confirmed' | 'in_progress' | 'completed' | 'absent';
|
|
671
|
+
/** Bill of materials */
|
|
672
|
+
export interface BillOfMaterials {
|
|
673
|
+
id: string;
|
|
674
|
+
itemCode: string;
|
|
675
|
+
itemName: string;
|
|
676
|
+
version: string;
|
|
677
|
+
status: BOMStatus;
|
|
678
|
+
quantity: number;
|
|
679
|
+
unit: string;
|
|
680
|
+
components: BOMComponent[];
|
|
681
|
+
operations?: BOMOperation[];
|
|
682
|
+
effectiveDate?: Date;
|
|
683
|
+
expiryDate?: Date;
|
|
684
|
+
notes?: string;
|
|
685
|
+
}
|
|
686
|
+
/** BOM status */
|
|
687
|
+
export type BOMStatus = 'draft' | 'pending_approval' | 'approved' | 'obsolete';
|
|
688
|
+
/** BOM component */
|
|
689
|
+
export interface BOMComponent {
|
|
690
|
+
id: string;
|
|
691
|
+
itemCode: string;
|
|
692
|
+
itemName: string;
|
|
693
|
+
quantity: number;
|
|
694
|
+
unit: string;
|
|
695
|
+
scrapPercent?: number;
|
|
696
|
+
position?: string;
|
|
697
|
+
phantom?: boolean;
|
|
698
|
+
alternatives?: AlternativeComponent[];
|
|
699
|
+
leadTime?: number;
|
|
700
|
+
}
|
|
701
|
+
/** Alternative component */
|
|
702
|
+
export interface AlternativeComponent {
|
|
703
|
+
itemCode: string;
|
|
704
|
+
itemName: string;
|
|
705
|
+
quantity: number;
|
|
706
|
+
priority: number;
|
|
707
|
+
}
|
|
708
|
+
/** BOM operation */
|
|
709
|
+
export interface BOMOperation {
|
|
710
|
+
id: string;
|
|
711
|
+
sequence: number;
|
|
712
|
+
name: string;
|
|
713
|
+
workCenter: string;
|
|
714
|
+
setupTime: number;
|
|
715
|
+
runTime: number;
|
|
716
|
+
runTimeUnit: 'per_piece' | 'per_batch';
|
|
717
|
+
overlapPercent?: number;
|
|
718
|
+
instructions?: string;
|
|
719
|
+
}
|
|
720
|
+
/** Work order */
|
|
721
|
+
export interface WorkOrder {
|
|
722
|
+
id: string;
|
|
723
|
+
number: string;
|
|
724
|
+
status: WorkOrderStatus;
|
|
725
|
+
type: WorkOrderType;
|
|
726
|
+
item: string;
|
|
727
|
+
itemName: string;
|
|
728
|
+
quantity: number;
|
|
729
|
+
unit: string;
|
|
730
|
+
bomId?: string;
|
|
731
|
+
routingId?: string;
|
|
732
|
+
plannedStart: Date;
|
|
733
|
+
plannedEnd: Date;
|
|
734
|
+
actualStart?: Date;
|
|
735
|
+
actualEnd?: Date;
|
|
736
|
+
operations: WorkOrderOperation[];
|
|
737
|
+
materials: WorkOrderMaterial[];
|
|
738
|
+
priority: WorkOrderPriority;
|
|
739
|
+
sourceDocument?: string;
|
|
740
|
+
notes?: string;
|
|
741
|
+
}
|
|
742
|
+
/** Work order status */
|
|
743
|
+
export type WorkOrderStatus = 'planned' | 'released' | 'in_progress' | 'completed' | 'closed' | 'cancelled';
|
|
744
|
+
/** Work order type */
|
|
745
|
+
export type WorkOrderType = 'production' | 'rework' | 'disassembly';
|
|
746
|
+
/** Work order priority */
|
|
747
|
+
export type WorkOrderPriority = 'low' | 'normal' | 'high' | 'urgent';
|
|
748
|
+
/** Work order operation */
|
|
749
|
+
export interface WorkOrderOperation {
|
|
750
|
+
id: string;
|
|
751
|
+
sequence: number;
|
|
752
|
+
name: string;
|
|
753
|
+
workCenter: string;
|
|
754
|
+
status: OperationStatus;
|
|
755
|
+
plannedSetup: number;
|
|
756
|
+
plannedRun: number;
|
|
757
|
+
actualSetup?: number;
|
|
758
|
+
actualRun?: number;
|
|
759
|
+
quantityProduced: number;
|
|
760
|
+
quantityScrapped: number;
|
|
761
|
+
startedAt?: Date;
|
|
762
|
+
completedAt?: Date;
|
|
763
|
+
operator?: string;
|
|
764
|
+
}
|
|
765
|
+
/** Operation status */
|
|
766
|
+
export type OperationStatus = 'pending' | 'in_progress' | 'completed' | 'skipped';
|
|
767
|
+
/** Work order material */
|
|
768
|
+
export interface WorkOrderMaterial {
|
|
769
|
+
id: string;
|
|
770
|
+
item: string;
|
|
771
|
+
itemName: string;
|
|
772
|
+
requiredQty: number;
|
|
773
|
+
issuedQty: number;
|
|
774
|
+
unit: string;
|
|
775
|
+
status: MaterialStatus;
|
|
776
|
+
warehouse?: string;
|
|
777
|
+
location?: string;
|
|
778
|
+
lotNumber?: string;
|
|
779
|
+
}
|
|
780
|
+
/** Material status */
|
|
781
|
+
export type MaterialStatus = 'pending' | 'partial' | 'issued' | 'returned';
|
|
782
|
+
/** MRP config */
|
|
783
|
+
export interface MRPConfig {
|
|
784
|
+
planningHorizon: number;
|
|
785
|
+
timeBuckets: TimeBucket;
|
|
786
|
+
demandSources: DemandSource[];
|
|
787
|
+
lotSizing: LotSizingPolicy;
|
|
788
|
+
safetyStock: SafetyStockPolicy;
|
|
789
|
+
}
|
|
790
|
+
/** Time bucket */
|
|
791
|
+
export type TimeBucket = 'daily' | 'weekly' | 'monthly';
|
|
792
|
+
/** Demand source */
|
|
793
|
+
export type DemandSource = 'sales_orders' | 'forecast' | 'min_stock' | 'safety_stock';
|
|
794
|
+
/** Lot sizing policy */
|
|
795
|
+
export interface LotSizingPolicy {
|
|
796
|
+
method: LotSizingMethod;
|
|
797
|
+
minQty?: number;
|
|
798
|
+
maxQty?: number;
|
|
799
|
+
multiple?: number;
|
|
800
|
+
fixedQty?: number;
|
|
801
|
+
}
|
|
802
|
+
/** Lot sizing method */
|
|
803
|
+
export type LotSizingMethod = 'lot_for_lot' | 'fixed_order_qty' | 'min_max' | 'eoq' | 'period_order_qty';
|
|
804
|
+
/** Safety stock policy */
|
|
805
|
+
export interface SafetyStockPolicy {
|
|
806
|
+
method: SafetyStockMethod;
|
|
807
|
+
days?: number;
|
|
808
|
+
percentage?: number;
|
|
809
|
+
fixedQty?: number;
|
|
810
|
+
}
|
|
811
|
+
/** Safety stock method */
|
|
812
|
+
export type SafetyStockMethod = 'days_supply' | 'percentage' | 'fixed_quantity';
|
|
813
|
+
/** MRP result */
|
|
814
|
+
export interface MRPResult {
|
|
815
|
+
item: string;
|
|
816
|
+
itemName: string;
|
|
817
|
+
periods: MRPPeriod[];
|
|
818
|
+
plannedOrders: PlannedOrder[];
|
|
819
|
+
}
|
|
820
|
+
/** MRP period */
|
|
821
|
+
export interface MRPPeriod {
|
|
822
|
+
date: Date;
|
|
823
|
+
grossRequirement: number;
|
|
824
|
+
scheduledReceipts: number;
|
|
825
|
+
projectedOnHand: number;
|
|
826
|
+
netRequirement: number;
|
|
827
|
+
plannedOrderReceipt?: number;
|
|
828
|
+
plannedOrderRelease?: number;
|
|
829
|
+
}
|
|
830
|
+
/** Planned order */
|
|
831
|
+
export interface PlannedOrder {
|
|
832
|
+
id: string;
|
|
833
|
+
item: string;
|
|
834
|
+
quantity: number;
|
|
835
|
+
orderDate: Date;
|
|
836
|
+
dueDate: Date;
|
|
837
|
+
type: 'purchase' | 'production' | 'transfer';
|
|
838
|
+
}
|
|
839
|
+
/** Quality inspection */
|
|
840
|
+
export interface QualityInspection {
|
|
841
|
+
id: string;
|
|
842
|
+
number: string;
|
|
843
|
+
type: InspectionType;
|
|
844
|
+
status: InspectionStatus;
|
|
845
|
+
referenceDoc?: string;
|
|
846
|
+
item: string;
|
|
847
|
+
lotNumber?: string;
|
|
848
|
+
sampleSize: number;
|
|
849
|
+
inspectedQty: number;
|
|
850
|
+
passedQty: number;
|
|
851
|
+
failedQty: number;
|
|
852
|
+
inspectionDate: Date;
|
|
853
|
+
inspector?: string;
|
|
854
|
+
results: InspectionResult[];
|
|
855
|
+
disposition?: InspectionDisposition;
|
|
856
|
+
notes?: string;
|
|
857
|
+
}
|
|
858
|
+
/** Inspection type */
|
|
859
|
+
export type InspectionType = 'incoming' | 'in_process' | 'final' | 'receiving';
|
|
860
|
+
/** Inspection status */
|
|
861
|
+
export type InspectionStatus = 'pending' | 'in_progress' | 'completed' | 'cancelled';
|
|
862
|
+
/** Inspection result */
|
|
863
|
+
export interface InspectionResult {
|
|
864
|
+
characteristic: string;
|
|
865
|
+
specification?: string;
|
|
866
|
+
lowerLimit?: number;
|
|
867
|
+
upperLimit?: number;
|
|
868
|
+
actualValue: number | string;
|
|
869
|
+
passed: boolean;
|
|
870
|
+
notes?: string;
|
|
871
|
+
}
|
|
872
|
+
/** Inspection disposition */
|
|
873
|
+
export type InspectionDisposition = 'accept' | 'reject' | 'rework' | 'use_as_is' | 'return_to_vendor';
|
|
874
|
+
/** OEE data */
|
|
875
|
+
export interface OEEData {
|
|
876
|
+
workCenter: string;
|
|
877
|
+
period: Date;
|
|
878
|
+
availability: number;
|
|
879
|
+
performance: number;
|
|
880
|
+
quality: number;
|
|
881
|
+
oee: number;
|
|
882
|
+
plannedTime: number;
|
|
883
|
+
actualRunTime: number;
|
|
884
|
+
downtime: DowntimeEntry[];
|
|
885
|
+
idealCycleTime: number;
|
|
886
|
+
actualOutput: number;
|
|
887
|
+
goodUnits: number;
|
|
888
|
+
defects: number;
|
|
889
|
+
}
|
|
890
|
+
/** Downtime entry */
|
|
891
|
+
export interface DowntimeEntry {
|
|
892
|
+
id: string;
|
|
893
|
+
reason: DowntimeReason;
|
|
894
|
+
duration: number;
|
|
895
|
+
startTime: Date;
|
|
896
|
+
endTime?: Date;
|
|
897
|
+
notes?: string;
|
|
898
|
+
}
|
|
899
|
+
/** Downtime reason */
|
|
900
|
+
export type DowntimeReason = 'breakdown' | 'setup' | 'material_shortage' | 'quality_issue' | 'planned_maintenance' | 'no_operator' | 'other';
|
|
901
|
+
/** Warehouse */
|
|
902
|
+
export interface Warehouse {
|
|
903
|
+
id: string;
|
|
904
|
+
code: string;
|
|
905
|
+
name: string;
|
|
906
|
+
type: WarehouseType;
|
|
907
|
+
address?: Address;
|
|
908
|
+
zones: WarehouseZone[];
|
|
909
|
+
active: boolean;
|
|
910
|
+
defaultBinId?: string;
|
|
911
|
+
}
|
|
912
|
+
/** Warehouse type */
|
|
913
|
+
export type WarehouseType = 'raw_materials' | 'finished_goods' | 'distribution' | 'transit';
|
|
914
|
+
/** Address */
|
|
915
|
+
export interface Address {
|
|
916
|
+
street: string;
|
|
917
|
+
city: string;
|
|
918
|
+
state?: string;
|
|
919
|
+
postalCode: string;
|
|
920
|
+
country: string;
|
|
921
|
+
}
|
|
922
|
+
/** Warehouse zone */
|
|
923
|
+
export interface WarehouseZone {
|
|
924
|
+
id: string;
|
|
925
|
+
code: string;
|
|
926
|
+
name: string;
|
|
927
|
+
type: ZoneType;
|
|
928
|
+
aisles: Aisle[];
|
|
929
|
+
}
|
|
930
|
+
/** Zone type */
|
|
931
|
+
export type ZoneType = 'receiving' | 'storage' | 'picking' | 'packing' | 'shipping' | 'quarantine';
|
|
932
|
+
/** Aisle */
|
|
933
|
+
export interface Aisle {
|
|
934
|
+
id: string;
|
|
935
|
+
code: string;
|
|
936
|
+
racks: Rack[];
|
|
937
|
+
}
|
|
938
|
+
/** Rack */
|
|
939
|
+
export interface Rack {
|
|
940
|
+
id: string;
|
|
941
|
+
code: string;
|
|
942
|
+
levels: number;
|
|
943
|
+
binsPerLevel: number;
|
|
944
|
+
bins: Bin[];
|
|
945
|
+
}
|
|
946
|
+
/** Bin */
|
|
947
|
+
export interface Bin {
|
|
948
|
+
id: string;
|
|
949
|
+
code: string;
|
|
950
|
+
fullCode: string;
|
|
951
|
+
type: BinType;
|
|
952
|
+
status: BinStatus;
|
|
953
|
+
capacity?: BinCapacity;
|
|
954
|
+
items?: BinInventory[];
|
|
955
|
+
}
|
|
956
|
+
/** Bin type */
|
|
957
|
+
export type BinType = 'storage' | 'picking' | 'receiving' | 'shipping' | 'staging';
|
|
958
|
+
/** Bin status */
|
|
959
|
+
export type BinStatus = 'available' | 'full' | 'blocked';
|
|
960
|
+
/** Bin capacity */
|
|
961
|
+
export interface BinCapacity {
|
|
962
|
+
maxWeight?: number;
|
|
963
|
+
maxVolume?: number;
|
|
964
|
+
maxUnits?: number;
|
|
965
|
+
}
|
|
966
|
+
/** Bin inventory */
|
|
967
|
+
export interface BinInventory {
|
|
968
|
+
itemCode: string;
|
|
969
|
+
quantity: number;
|
|
970
|
+
unit: string;
|
|
971
|
+
lotNumber?: string;
|
|
972
|
+
serialNumbers?: string[];
|
|
973
|
+
expiryDate?: Date;
|
|
974
|
+
}
|
|
975
|
+
/** Stock movement */
|
|
976
|
+
export interface StockMovement {
|
|
977
|
+
id: string;
|
|
978
|
+
number: string;
|
|
979
|
+
type: MovementType;
|
|
980
|
+
status: MovementStatus;
|
|
981
|
+
date: Date;
|
|
982
|
+
sourceWarehouse?: string;
|
|
983
|
+
sourceBin?: string;
|
|
984
|
+
targetWarehouse?: string;
|
|
985
|
+
targetBin?: string;
|
|
986
|
+
lines: MovementLine[];
|
|
987
|
+
reference?: string;
|
|
988
|
+
notes?: string;
|
|
989
|
+
createdBy: string;
|
|
990
|
+
}
|
|
991
|
+
/** Movement type */
|
|
992
|
+
export type MovementType = 'receipt' | 'issue' | 'transfer' | 'adjustment' | 'scrap';
|
|
993
|
+
/** Movement status */
|
|
994
|
+
export type MovementStatus = 'draft' | 'confirmed' | 'in_transit' | 'completed' | 'cancelled';
|
|
995
|
+
/** Movement line */
|
|
996
|
+
export interface MovementLine {
|
|
997
|
+
id: string;
|
|
998
|
+
item: string;
|
|
999
|
+
itemName: string;
|
|
1000
|
+
quantity: number;
|
|
1001
|
+
unit: string;
|
|
1002
|
+
lotNumber?: string;
|
|
1003
|
+
serialNumbers?: string[];
|
|
1004
|
+
sourceBin?: string;
|
|
1005
|
+
targetBin?: string;
|
|
1006
|
+
}
|
|
1007
|
+
/** Picking list */
|
|
1008
|
+
export interface PickingList {
|
|
1009
|
+
id: string;
|
|
1010
|
+
number: string;
|
|
1011
|
+
type: PickingType;
|
|
1012
|
+
status: PickingStatus;
|
|
1013
|
+
warehouse: string;
|
|
1014
|
+
lines: PickingLine[];
|
|
1015
|
+
assignedTo?: string;
|
|
1016
|
+
startedAt?: Date;
|
|
1017
|
+
completedAt?: Date;
|
|
1018
|
+
sourceDocuments: string[];
|
|
1019
|
+
}
|
|
1020
|
+
/** Picking type */
|
|
1021
|
+
export type PickingType = 'single_order' | 'batch' | 'wave' | 'zone';
|
|
1022
|
+
/** Picking status */
|
|
1023
|
+
export type PickingStatus = 'pending' | 'released' | 'in_progress' | 'completed' | 'short';
|
|
1024
|
+
/** Picking line */
|
|
1025
|
+
export interface PickingLine {
|
|
1026
|
+
id: string;
|
|
1027
|
+
item: string;
|
|
1028
|
+
itemName: string;
|
|
1029
|
+
requestedQty: number;
|
|
1030
|
+
pickedQty: number;
|
|
1031
|
+
unit: string;
|
|
1032
|
+
sourceBin: string;
|
|
1033
|
+
lotNumber?: string;
|
|
1034
|
+
status: PickLineStatus;
|
|
1035
|
+
sequence: number;
|
|
1036
|
+
}
|
|
1037
|
+
/** Pick line status */
|
|
1038
|
+
export type PickLineStatus = 'pending' | 'picked' | 'short' | 'skipped';
|
|
1039
|
+
/** Inventory count */
|
|
1040
|
+
export interface InventoryCount {
|
|
1041
|
+
id: string;
|
|
1042
|
+
number: string;
|
|
1043
|
+
type: CountType;
|
|
1044
|
+
status: CountStatus;
|
|
1045
|
+
warehouse: string;
|
|
1046
|
+
zone?: string;
|
|
1047
|
+
scheduledDate: Date;
|
|
1048
|
+
startedAt?: Date;
|
|
1049
|
+
completedAt?: Date;
|
|
1050
|
+
lines: CountLine[];
|
|
1051
|
+
adjustmentId?: string;
|
|
1052
|
+
}
|
|
1053
|
+
/** Count type */
|
|
1054
|
+
export type CountType = 'full' | 'cycle' | 'spot';
|
|
1055
|
+
/** Count status */
|
|
1056
|
+
export type CountStatus = 'planned' | 'in_progress' | 'pending_review' | 'completed';
|
|
1057
|
+
/** Count line */
|
|
1058
|
+
export interface CountLine {
|
|
1059
|
+
id: string;
|
|
1060
|
+
item: string;
|
|
1061
|
+
bin: string;
|
|
1062
|
+
lotNumber?: string;
|
|
1063
|
+
systemQty: number;
|
|
1064
|
+
countedQty?: number;
|
|
1065
|
+
variance?: number;
|
|
1066
|
+
recounted?: boolean;
|
|
1067
|
+
status: CountLineStatus;
|
|
1068
|
+
}
|
|
1069
|
+
/** Count line status */
|
|
1070
|
+
export type CountLineStatus = 'pending' | 'counted' | 'variance' | 'approved';
|
|
1071
|
+
/** Customer */
|
|
1072
|
+
export interface Customer {
|
|
1073
|
+
id: string;
|
|
1074
|
+
code: string;
|
|
1075
|
+
name: string;
|
|
1076
|
+
type: CustomerType;
|
|
1077
|
+
status: CustomerStatus;
|
|
1078
|
+
contacts: Contact[];
|
|
1079
|
+
addresses: CustomerAddress[];
|
|
1080
|
+
creditLimit?: number;
|
|
1081
|
+
paymentTerms?: string;
|
|
1082
|
+
priceList?: string;
|
|
1083
|
+
salesRep?: string;
|
|
1084
|
+
territory?: string;
|
|
1085
|
+
industry?: string;
|
|
1086
|
+
tags?: string[];
|
|
1087
|
+
customFields?: Record<string, unknown>;
|
|
1088
|
+
createdAt: Date;
|
|
1089
|
+
updatedAt: Date;
|
|
1090
|
+
}
|
|
1091
|
+
/** Customer type */
|
|
1092
|
+
export type CustomerType = 'individual' | 'company' | 'government' | 'non_profit';
|
|
1093
|
+
/** Customer status */
|
|
1094
|
+
export type CustomerStatus = 'active' | 'inactive' | 'blocked' | 'prospect';
|
|
1095
|
+
/** Contact */
|
|
1096
|
+
export interface Contact {
|
|
1097
|
+
id: string;
|
|
1098
|
+
firstName: string;
|
|
1099
|
+
lastName: string;
|
|
1100
|
+
email?: string;
|
|
1101
|
+
phone?: string;
|
|
1102
|
+
mobile?: string;
|
|
1103
|
+
title?: string;
|
|
1104
|
+
department?: string;
|
|
1105
|
+
isPrimary?: boolean;
|
|
1106
|
+
notes?: string;
|
|
1107
|
+
}
|
|
1108
|
+
/** Customer address */
|
|
1109
|
+
export interface CustomerAddress {
|
|
1110
|
+
id: string;
|
|
1111
|
+
type: AddressType;
|
|
1112
|
+
address: Address;
|
|
1113
|
+
isPrimary?: boolean;
|
|
1114
|
+
}
|
|
1115
|
+
/** Address type */
|
|
1116
|
+
export type AddressType = 'billing' | 'shipping' | 'both';
|
|
1117
|
+
/** Lead */
|
|
1118
|
+
export interface Lead {
|
|
1119
|
+
id: string;
|
|
1120
|
+
firstName: string;
|
|
1121
|
+
lastName: string;
|
|
1122
|
+
company?: string;
|
|
1123
|
+
email?: string;
|
|
1124
|
+
phone?: string;
|
|
1125
|
+
source: LeadSource;
|
|
1126
|
+
status: LeadStatus;
|
|
1127
|
+
score?: number;
|
|
1128
|
+
assignedTo?: string;
|
|
1129
|
+
notes?: string;
|
|
1130
|
+
activities: LeadActivity[];
|
|
1131
|
+
convertedAt?: Date;
|
|
1132
|
+
convertedTo?: string;
|
|
1133
|
+
createdAt: Date;
|
|
1134
|
+
updatedAt: Date;
|
|
1135
|
+
}
|
|
1136
|
+
/** Lead source */
|
|
1137
|
+
export type LeadSource = 'website' | 'referral' | 'trade_show' | 'cold_call' | 'advertisement' | 'social_media' | 'other';
|
|
1138
|
+
/** Lead status */
|
|
1139
|
+
export type LeadStatus = 'new' | 'contacted' | 'qualified' | 'unqualified' | 'converted';
|
|
1140
|
+
/** Lead activity */
|
|
1141
|
+
export interface LeadActivity {
|
|
1142
|
+
id: string;
|
|
1143
|
+
type: ActivityType;
|
|
1144
|
+
subject: string;
|
|
1145
|
+
description?: string;
|
|
1146
|
+
date: Date;
|
|
1147
|
+
duration?: number;
|
|
1148
|
+
outcome?: string;
|
|
1149
|
+
createdBy: string;
|
|
1150
|
+
}
|
|
1151
|
+
/** Activity type */
|
|
1152
|
+
export type ActivityType = 'call' | 'email' | 'meeting' | 'task' | 'note';
|
|
1153
|
+
/** Opportunity */
|
|
1154
|
+
export interface Opportunity {
|
|
1155
|
+
id: string;
|
|
1156
|
+
name: string;
|
|
1157
|
+
customer?: string;
|
|
1158
|
+
contact?: string;
|
|
1159
|
+
stage: OpportunityStage;
|
|
1160
|
+
amount: number;
|
|
1161
|
+
currency: string;
|
|
1162
|
+
probability: number;
|
|
1163
|
+
expectedCloseDate: Date;
|
|
1164
|
+
assignedTo?: string;
|
|
1165
|
+
source?: LeadSource;
|
|
1166
|
+
products?: OpportunityProduct[];
|
|
1167
|
+
activities: LeadActivity[];
|
|
1168
|
+
competitors?: string[];
|
|
1169
|
+
notes?: string;
|
|
1170
|
+
wonReason?: string;
|
|
1171
|
+
lostReason?: string;
|
|
1172
|
+
closedAt?: Date;
|
|
1173
|
+
createdAt: Date;
|
|
1174
|
+
updatedAt: Date;
|
|
1175
|
+
}
|
|
1176
|
+
/** Opportunity stage */
|
|
1177
|
+
export type OpportunityStage = 'prospecting' | 'qualification' | 'proposal' | 'negotiation' | 'closed_won' | 'closed_lost';
|
|
1178
|
+
/** Opportunity product */
|
|
1179
|
+
export interface OpportunityProduct {
|
|
1180
|
+
productId: string;
|
|
1181
|
+
productName: string;
|
|
1182
|
+
quantity: number;
|
|
1183
|
+
unitPrice: number;
|
|
1184
|
+
discount?: number;
|
|
1185
|
+
total: number;
|
|
1186
|
+
}
|
|
1187
|
+
/** Sales order */
|
|
1188
|
+
export interface SalesOrder {
|
|
1189
|
+
id: string;
|
|
1190
|
+
number: string;
|
|
1191
|
+
status: SalesOrderStatus;
|
|
1192
|
+
customer: string;
|
|
1193
|
+
customerName: string;
|
|
1194
|
+
contact?: string;
|
|
1195
|
+
billingAddress: Address;
|
|
1196
|
+
shippingAddress: Address;
|
|
1197
|
+
orderDate: Date;
|
|
1198
|
+
requestedDate?: Date;
|
|
1199
|
+
promisedDate?: Date;
|
|
1200
|
+
currency: string;
|
|
1201
|
+
lines: SalesOrderLine[];
|
|
1202
|
+
subtotal: number;
|
|
1203
|
+
discount?: number;
|
|
1204
|
+
tax: number;
|
|
1205
|
+
shipping?: number;
|
|
1206
|
+
total: number;
|
|
1207
|
+
paymentTerms?: string;
|
|
1208
|
+
shippingMethod?: string;
|
|
1209
|
+
notes?: string;
|
|
1210
|
+
createdBy: string;
|
|
1211
|
+
createdAt: Date;
|
|
1212
|
+
}
|
|
1213
|
+
/** Sales order status */
|
|
1214
|
+
export type SalesOrderStatus = 'draft' | 'confirmed' | 'processing' | 'shipped' | 'delivered' | 'cancelled';
|
|
1215
|
+
/** Sales order line */
|
|
1216
|
+
export interface SalesOrderLine {
|
|
1217
|
+
id: string;
|
|
1218
|
+
lineNumber: number;
|
|
1219
|
+
item: string;
|
|
1220
|
+
itemName: string;
|
|
1221
|
+
quantity: number;
|
|
1222
|
+
unit: string;
|
|
1223
|
+
unitPrice: number;
|
|
1224
|
+
discount?: number;
|
|
1225
|
+
tax: number;
|
|
1226
|
+
total: number;
|
|
1227
|
+
requestedDate?: Date;
|
|
1228
|
+
promisedDate?: Date;
|
|
1229
|
+
shippedQty: number;
|
|
1230
|
+
invoicedQty: number;
|
|
1231
|
+
warehouse?: string;
|
|
1232
|
+
}
|
|
1233
|
+
/** Quote */
|
|
1234
|
+
export interface Quote {
|
|
1235
|
+
id: string;
|
|
1236
|
+
number: string;
|
|
1237
|
+
status: QuoteStatus;
|
|
1238
|
+
customer?: string;
|
|
1239
|
+
contact?: string;
|
|
1240
|
+
validUntil: Date;
|
|
1241
|
+
currency: string;
|
|
1242
|
+
lines: QuoteLine[];
|
|
1243
|
+
subtotal: number;
|
|
1244
|
+
discount?: number;
|
|
1245
|
+
tax: number;
|
|
1246
|
+
total: number;
|
|
1247
|
+
terms?: string;
|
|
1248
|
+
notes?: string;
|
|
1249
|
+
createdBy: string;
|
|
1250
|
+
createdAt: Date;
|
|
1251
|
+
convertedToOrder?: string;
|
|
1252
|
+
}
|
|
1253
|
+
/** Quote status */
|
|
1254
|
+
export type QuoteStatus = 'draft' | 'sent' | 'accepted' | 'rejected' | 'expired';
|
|
1255
|
+
/** Quote line */
|
|
1256
|
+
export interface QuoteLine {
|
|
1257
|
+
id: string;
|
|
1258
|
+
lineNumber: number;
|
|
1259
|
+
item: string;
|
|
1260
|
+
itemName: string;
|
|
1261
|
+
quantity: number;
|
|
1262
|
+
unit: string;
|
|
1263
|
+
unitPrice: number;
|
|
1264
|
+
listPrice: number;
|
|
1265
|
+
discount?: number;
|
|
1266
|
+
tax: number;
|
|
1267
|
+
total: number;
|
|
1268
|
+
notes?: string;
|
|
1269
|
+
}
|
|
1270
|
+
//# sourceMappingURL=erp-enterprise.d.ts.map
|