@spaceinvoices/react-ui 0.4.10 → 0.4.11

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.
Files changed (33) hide show
  1. package/README.md +24 -8
  2. package/cli/dist/index.js +89 -26
  3. package/package.json +4 -1
  4. package/spaceinvoices.schema.json +6 -1
  5. package/src/components/entities/entity-settings-form/entity-settings-form.tsx +10 -10
  6. package/src/components/entities/entity-settings-form/locales/de.ts +10 -0
  7. package/src/components/entities/entity-settings-form/locales/es.ts +10 -0
  8. package/src/components/entities/entity-settings-form/locales/fr.ts +10 -0
  9. package/src/components/entities/entity-settings-form/locales/hr.ts +10 -0
  10. package/src/components/entities/entity-settings-form/locales/it.ts +10 -0
  11. package/src/components/entities/entity-settings-form/locales/nl.ts +10 -0
  12. package/src/components/entities/entity-settings-form/locales/pl.ts +10 -0
  13. package/src/components/entities/entity-settings-form/locales/pt.ts +10 -0
  14. package/src/components/entities/entity-settings-form/locales/sl.ts +10 -0
  15. package/src/components/entities/settings/defaults-settings-form.tsx +6 -6
  16. package/src/components/invoices/send-email-dialog/locales/de.ts +18 -0
  17. package/src/components/invoices/send-email-dialog/locales/es.ts +18 -0
  18. package/src/components/invoices/send-email-dialog/locales/fr.ts +18 -0
  19. package/src/components/invoices/send-email-dialog/locales/hr.ts +18 -0
  20. package/src/components/invoices/send-email-dialog/locales/it.ts +18 -0
  21. package/src/components/invoices/send-email-dialog/locales/nl.ts +18 -0
  22. package/src/components/invoices/send-email-dialog/locales/pl.ts +18 -0
  23. package/src/components/invoices/send-email-dialog/locales/pt.ts +18 -0
  24. package/src/components/invoices/send-email-dialog/locales/sl.ts +18 -0
  25. package/src/components/invoices/send-email-dialog/send-email-dialog.tsx +19 -19
  26. package/src/components/payments/create-payment-form/index.ts +1 -0
  27. package/src/components/request-logs/request-log-list-table.tsx +1 -1
  28. package/src/components/ui/sidebar.tsx +3 -2
  29. package/src/generate-schemas.ts +3 -3
  30. package/src/generated/schemas/entity.ts +100 -0
  31. package/src/generated/schemas/exportsloveniayearlynormiranireport_body.ts +27 -0
  32. package/src/generated/schemas/index.ts +2 -0
  33. package/src/generated/schemas/sloveniataxprofile.ts +42 -0
package/README.md CHANGED
@@ -1,19 +1,25 @@
1
- # @spaceinvoices/react-ui - Space Invoices Component Library
1
+ # @spaceinvoices/react-ui - Space Invoices React UI Kit
2
2
 
3
- > **Pre-built React components for the Space Invoices API**
3
+ > **Copy-paste React UI for the Space Invoices API**
4
4
 
5
- 70+ components for building invoicing applications with the Space Invoices API. Includes forms, tables, dashboard charts, and more - all designed to be copied into your project for full customization.
5
+ 50+ installable components for building invoicing applications with the Space Invoices API. Includes forms, tables, dashboard charts, and more - all designed to be copied into your project for full customization.
6
6
 
7
7
  ## Philosophy
8
8
 
9
- These components are **designed to be copied**, not installed as a package:
9
+ This package is a **CLI installer and source registry**, not a conventional runtime component library. The intended flow is:
10
+
11
+ 1. initialize your app with the CLI
12
+ 2. add only the components you need
13
+ 3. own the copied source inside your app
14
+
15
+ These components are **designed to be copied**, not imported from `node_modules` at runtime:
10
16
 
11
17
  - **Full ownership** - Modify freely without breaking changes
12
18
  - **Complete customization** - Change behavior and structure
13
19
  - **No version conflicts** - You control when to update
14
20
  - **Zero lock-in** - Components work standalone in your codebase
15
21
 
16
- **Note**: Components are built on **shadcn/ui primitives**. Bring your own shadcn/ui components or use any alternative. The `components/ui/` folder is included as reference only.
22
+ **Note**: Components are built on **shadcn/ui primitives**. Bring your own shadcn/ui components or use any alternative. The CLI can copy compatible `components/ui/` primitives when needed, but teams using their own design system can swap those imports after install.
17
23
 
18
24
  ## Quick Start (CLI - Recommended)
19
25
 
@@ -36,6 +42,7 @@ The CLI will:
36
42
  - Create `spaceinvoices.json` config with your preferred paths
37
43
  - Install required dependencies (`@spaceinvoices/js-sdk`, `@tanstack/react-query`)
38
44
  - Copy essential files (SDK provider, utilities)
45
+ - Copy generated Zod schemas when installed components depend on them
39
46
  - Transform import paths to match your project structure
40
47
  - Install npm dependencies for each component
41
48
 
@@ -101,7 +108,10 @@ cp -r react-ui/src/components/customers/ your-project/src/components/space-invoi
101
108
  cp -r react-ui/src/components/table/ your-project/src/components/space-invoices/
102
109
  # ... add more as needed
103
110
 
104
- # DON'T copy components/ui/ - use shadcn/ui instead
111
+ # Include generated schemas if you use form components
112
+ cp -r react-ui/src/generated/ your-project/src/generated/
113
+
114
+ # Optional: skip components/ui/ if you already use shadcn/ui or your own primitives
105
115
  ```
106
116
 
107
117
  ### 4. Update Import Paths
@@ -158,9 +168,13 @@ src/components/
158
168
  └── table/ # Generic data table infrastructure
159
169
  ```
160
170
 
161
- ### UI Primitives (Reference Only)
171
+ ### UI Primitives (Optional)
172
+
173
+ The `components/ui/` folder contains shadcn/ui-style components. You can:
162
174
 
163
- The `components/ui/` folder contains shadcn/ui-style components. **Don't copy these** - use shadcn/ui directly:
175
+ - let the CLI install compatible primitives for you
176
+ - use shadcn/ui directly
177
+ - swap to your own component library after copying the feature components
164
178
 
165
179
  ```bash
166
180
  npx shadcn@latest add button input form table dialog select
@@ -175,6 +189,8 @@ src/
175
189
  ├── providers/
176
190
  │ ├── sdk-provider.tsx # SDK context (required)
177
191
  │ └── entities-provider.tsx # Active entity context (required)
192
+ ├── generated/
193
+ │ └── schemas/ # Generated Zod schemas used by form components
178
194
  ├── hooks/
179
195
  │ └── *.ts # Shared hooks
180
196
  └── lib/
package/cli/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { Command } from "commander";
5
5
 
6
6
  // cli/src/commands/init.ts
7
7
  import fs4 from "fs";
8
- import path4 from "path";
8
+ import path5 from "path";
9
9
  import prompts from "prompts";
10
10
 
11
11
  // cli/src/utils/config.ts
@@ -19,7 +19,8 @@ var DEFAULT_CONFIG = {
19
19
  ui: "@/components/ui",
20
20
  lib: "@/lib",
21
21
  hooks: "@/hooks",
22
- providers: "@/providers"
22
+ providers: "@/providers",
23
+ generated: "@/generated"
23
24
  }
24
25
  };
25
26
  function getConfigPath(cwd = process.cwd()) {
@@ -44,6 +45,20 @@ function writeConfig(config, cwd = process.cwd()) {
44
45
  const configPath = getConfigPath(cwd);
45
46
  fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n");
46
47
  }
48
+ function resolveAliasPath(alias, cwd = process.cwd()) {
49
+ if (path.isAbsolute(alias)) {
50
+ return alias;
51
+ }
52
+ if (alias.startsWith("@/")) {
53
+ const srcPath = path.join(cwd, "src", alias.slice(2));
54
+ const rootPath = path.join(cwd, alias.slice(2));
55
+ if (fs.existsSync(path.join(cwd, "src"))) {
56
+ return srcPath;
57
+ }
58
+ return rootPath;
59
+ }
60
+ return path.join(cwd, alias);
61
+ }
47
62
 
48
63
  // cli/src/utils/installer.ts
49
64
  import { spawn } from "child_process";
@@ -268,6 +283,7 @@ function getComponentsByCategory(registry) {
268
283
  }
269
284
 
270
285
  // cli/src/utils/transformer.ts
286
+ import path4 from "path";
271
287
  function transformImports(source, config) {
272
288
  let result = source;
273
289
  const replacements = [
@@ -280,7 +296,9 @@ function transformImports(source, config) {
280
296
  // Lib utilities: @/ui/lib/ -> config.aliases.lib/
281
297
  [/@\/ui\/lib\//g, `${config.aliases.lib}/`],
282
298
  // Hooks: @/ui/hooks/ -> config.aliases.hooks/
283
- [/@\/ui\/hooks\//g, `${config.aliases.hooks}/`]
299
+ [/@\/ui\/hooks\//g, `${config.aliases.hooks}/`],
300
+ // Generated helpers: @/ui/generated/ -> config.aliases.generated/
301
+ [/@\/ui\/generated\//g, `${config.aliases.generated}/`]
284
302
  ];
285
303
  for (const [pattern, replacement] of replacements) {
286
304
  result = result.replace(pattern, replacement);
@@ -318,6 +336,12 @@ function getDestinationPath(sourcePath, config) {
318
336
  category: "hooks"
319
337
  };
320
338
  }
339
+ if (sourcePath.startsWith("generated/")) {
340
+ return {
341
+ destPath: sourcePath.replace("generated/", ""),
342
+ category: "generated"
343
+ };
344
+ }
321
345
  return {
322
346
  destPath: sourcePath,
323
347
  category: "components"
@@ -326,13 +350,7 @@ function getDestinationPath(sourcePath, config) {
326
350
  function getFullDestinationPath(sourcePath, config, basePath) {
327
351
  const { destPath, category } = getDestinationPath(sourcePath, config);
328
352
  const alias = config.aliases[category];
329
- let relativePath;
330
- if (alias.startsWith("@/")) {
331
- relativePath = alias.slice(2);
332
- } else {
333
- relativePath = alias;
334
- }
335
- return `${basePath}/src/${relativePath}/${destPath}`;
353
+ return path4.join(resolveAliasPath(alias, basePath), destPath);
336
354
  }
337
355
 
338
356
  // cli/src/commands/init.ts
@@ -397,6 +415,12 @@ async function init(options = {}) {
397
415
  name: "providers",
398
416
  message: "Where should providers be installed?",
399
417
  initial: DEFAULT_CONFIG.aliases.providers
418
+ },
419
+ {
420
+ type: "text",
421
+ name: "generated",
422
+ message: "Where should generated helpers (schemas) be installed?",
423
+ initial: DEFAULT_CONFIG.aliases.generated
400
424
  }
401
425
  ]);
402
426
  if (!answers.components) {
@@ -410,7 +434,8 @@ async function init(options = {}) {
410
434
  ui: answers.ui,
411
435
  lib: answers.lib,
412
436
  hooks: answers.hooks,
413
- providers: answers.providers
437
+ providers: answers.providers,
438
+ generated: answers.generated
414
439
  }
415
440
  };
416
441
  }
@@ -431,16 +456,11 @@ async function init(options = {}) {
431
456
  config.aliases.ui,
432
457
  config.aliases.lib,
433
458
  config.aliases.hooks,
434
- config.aliases.providers
459
+ config.aliases.providers,
460
+ config.aliases.generated
435
461
  ];
436
462
  for (const alias of directories) {
437
- let dirPath;
438
- if (alias.startsWith("@/")) {
439
- dirPath = path4.join(cwd, "src", alias.slice(2));
440
- } else {
441
- dirPath = path4.join(cwd, alias);
442
- }
443
- fs4.mkdirSync(dirPath, { recursive: true });
463
+ fs4.mkdirSync(resolveAliasPath(alias, cwd), { recursive: true });
444
464
  }
445
465
  dirSpinner.succeed("Created directories");
446
466
  } catch (error) {
@@ -454,7 +474,7 @@ async function init(options = {}) {
454
474
  const content = await fetchFile(filePath);
455
475
  const transformed = transformImports(content, config);
456
476
  const destPath = getFullDestinationPath(filePath, config, cwd);
457
- fs4.mkdirSync(path4.dirname(destPath), { recursive: true });
477
+ fs4.mkdirSync(path5.dirname(destPath), { recursive: true });
458
478
  fs4.writeFileSync(destPath, transformed);
459
479
  }
460
480
  filesSpinner.succeed(`Copied ${ESSENTIAL_FILES.length} essential files`);
@@ -488,7 +508,7 @@ async function init(options = {}) {
488
508
 
489
509
  // cli/src/commands/add.ts
490
510
  import fs5 from "fs";
491
- import path5 from "path";
511
+ import path6 from "path";
492
512
  import prompts2 from "prompts";
493
513
 
494
514
  // cli/src/utils/resolver.ts
@@ -614,6 +634,31 @@ function getInstallSummary(resolved) {
614
634
  };
615
635
  }
616
636
 
637
+ // cli/src/utils/file-dependencies.ts
638
+ var GENERATED_IMPORT_PATTERN = /from\s+["']@\/ui\/generated\/schemas(?:\/([^"']+))?["']/g;
639
+ var GENERATED_EXPORT_PATTERN = /from\s+['"]\.\/([^'"]+)['"]/g;
640
+ function normalizeGeneratedPath(subpath) {
641
+ return `generated/schemas/${subpath.replace(/\.ts$/, "")}.ts`;
642
+ }
643
+ function getRegistryManagedDependencies(filePath, source) {
644
+ const dependencies = /* @__PURE__ */ new Set();
645
+ if (filePath === "generated/schemas/index.ts") {
646
+ for (const match of source.matchAll(GENERATED_EXPORT_PATTERN)) {
647
+ dependencies.add(normalizeGeneratedPath(match[1]));
648
+ }
649
+ return [...dependencies];
650
+ }
651
+ for (const match of source.matchAll(GENERATED_IMPORT_PATTERN)) {
652
+ const subpath = match[1];
653
+ if (subpath) {
654
+ dependencies.add(normalizeGeneratedPath(subpath));
655
+ continue;
656
+ }
657
+ dependencies.add("generated/schemas/index.ts");
658
+ }
659
+ return [...dependencies];
660
+ }
661
+
617
662
  // cli/src/commands/add.ts
618
663
  async function add(componentNames, options = {}) {
619
664
  const cwd = options.cwd ?? process.cwd();
@@ -674,6 +719,7 @@ async function add(componentNames, options = {}) {
674
719
  resolveSpinner.fail("Failed to resolve dependencies");
675
720
  throw error;
676
721
  }
722
+ const fileContents = await collectRegistryFiles(resolved.allFiles);
677
723
  const summary = getInstallSummary(resolved);
678
724
  logger.break();
679
725
  logger.info("The following will be installed:");
@@ -692,7 +738,7 @@ async function add(componentNames, options = {}) {
692
738
  ` ${highlight("npm packages:")} ${summary.npmPackages.join(", ")}`
693
739
  );
694
740
  }
695
- logger.log(` ${highlight("Files:")} ${summary.fileCount} files`);
741
+ logger.log(` ${highlight("Files:")} ${fileContents.size} files`);
696
742
  if (!options.yes) {
697
743
  logger.break();
698
744
  const { proceed } = await prompts2({
@@ -712,12 +758,11 @@ async function add(componentNames, options = {}) {
712
758
  const existingFiles = [];
713
759
  const filesToWrite = [];
714
760
  try {
715
- for (const filePath of resolved.allFiles) {
761
+ for (const [filePath, content] of fileContents) {
716
762
  const destPath = getFullDestinationPath(filePath, config, cwd);
717
763
  if (fs5.existsSync(destPath)) {
718
764
  existingFiles.push(destPath);
719
765
  }
720
- const content = await fetchFile(filePath);
721
766
  const transformed = transformImports(content, config);
722
767
  filesToWrite.push({ path: destPath, content: transformed });
723
768
  }
@@ -753,7 +798,7 @@ async function add(componentNames, options = {}) {
753
798
  }
754
799
  try {
755
800
  for (const { path: filePath, content } of filesToWrite) {
756
- fs5.mkdirSync(path5.dirname(filePath), { recursive: true });
801
+ fs5.mkdirSync(path6.dirname(filePath), { recursive: true });
757
802
  fs5.writeFileSync(filePath, content);
758
803
  }
759
804
  filesSpinner.succeed(`Installed ${filesToWrite.length} files`);
@@ -780,6 +825,24 @@ async function add(componentNames, options = {}) {
780
825
  logger.success("Components installed successfully!");
781
826
  logger.break();
782
827
  }
828
+ async function collectRegistryFiles(initialFiles) {
829
+ const pending = [...initialFiles];
830
+ const contents = /* @__PURE__ */ new Map();
831
+ while (pending.length > 0) {
832
+ const filePath = pending.shift();
833
+ if (!filePath || contents.has(filePath)) {
834
+ continue;
835
+ }
836
+ const content = await fetchFile(filePath);
837
+ contents.set(filePath, content);
838
+ for (const dependency of getRegistryManagedDependencies(filePath, content)) {
839
+ if (!contents.has(dependency)) {
840
+ pending.push(dependency);
841
+ }
842
+ }
843
+ }
844
+ return contents;
845
+ }
783
846
  async function selectComponents(registry) {
784
847
  const byCategory = getComponentsByCategory(registry);
785
848
  const choices = [];
@@ -870,7 +933,7 @@ async function list(options = {}) {
870
933
 
871
934
  // cli/src/index.ts
872
935
  var program = new Command();
873
- program.name("spaceinvoices-ui").description("CLI for adding Space Invoices React UI components to your project").version("0.4.10");
936
+ program.name("spaceinvoices-ui").description("CLI for adding Space Invoices React UI components to your project").version("0.4.11");
874
937
  program.option("--local <path>", "Use local registry from specified path (for development)");
875
938
  program.command("init").description("Initialize Space Invoices UI in your project").option("-y, --yes", "Skip prompts and use defaults").option("-f, --force", "Overwrite existing configuration").option("--cwd <path>", "Working directory (defaults to current directory)").action(async (options) => {
876
939
  const globalOpts = program.opts();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spaceinvoices/react-ui",
3
3
  "type": "module",
4
- "version": "0.4.10",
4
+ "version": "0.4.11",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "description": "Space Invoices UI components - copy-paste distribution with CLI support",
@@ -78,6 +78,9 @@
78
78
  "zod": "^4.1.12"
79
79
  },
80
80
  "devDependencies": {
81
+ "@happy-dom/global-registrator": "^20.8.3",
82
+ "@testing-library/jest-dom": "^6.9.1",
83
+ "@testing-library/react": "^16.3.2",
81
84
  "@types/bun": "latest",
82
85
  "@types/prompts": "^2.4.9",
83
86
  "@types/react": "^19.1.0",
@@ -12,7 +12,7 @@
12
12
  "aliases": {
13
13
  "type": "object",
14
14
  "description": "Path aliases for component installation",
15
- "required": ["components", "ui", "lib", "hooks", "providers"],
15
+ "required": ["components", "ui", "lib", "hooks", "providers", "generated"],
16
16
  "properties": {
17
17
  "components": {
18
18
  "type": "string",
@@ -38,6 +38,11 @@
38
38
  "type": "string",
39
39
  "description": "Path alias for React providers (e.g., @/providers)",
40
40
  "default": "@/providers"
41
+ },
42
+ "generated": {
43
+ "type": "string",
44
+ "description": "Path alias for generated helpers such as Zod schemas (e.g., @/generated)",
45
+ "default": "@/generated"
41
46
  }
42
47
  },
43
48
  "additionalProperties": false
@@ -56,15 +56,15 @@ const translations = {
56
56
  // Supported locales (matching backend)
57
57
  const SUPPORTED_LOCALES = [
58
58
  { value: "en-US", label: "English (US)" },
59
- { value: "de-DE", label: "Deutsch (DE)" },
60
- { value: "it-IT", label: "Italiano (IT)" },
61
- { value: "fr-FR", label: "Français (FR)" },
62
- { value: "es-ES", label: "Español (ES)" },
63
- { value: "pt-PT", label: "Português (Portugal)" },
64
- { value: "nl-NL", label: "Nederlands" },
65
- { value: "pl-PL", label: "Polski" },
66
- { value: "hr-HR", label: "Hrvatski" },
67
- { value: "sl-SI", label: "Slovenščina (SI)" },
59
+ { value: "de-DE", label: "German (DE)" },
60
+ { value: "it-IT", label: "Italian (IT)" },
61
+ { value: "fr-FR", label: "French (FR)" },
62
+ { value: "es-ES", label: "Spanish (ES)" },
63
+ { value: "pt-PT", label: "Portuguese (Portugal)" },
64
+ { value: "nl-NL", label: "Dutch" },
65
+ { value: "pl-PL", label: "Polish" },
66
+ { value: "hr-HR", label: "Croatian" },
67
+ { value: "sl-SI", label: "Slovenian (SI)" },
68
68
  ] as const;
69
69
 
70
70
  // Countries with EPC QR feature (EU 27 + Switzerland)
@@ -805,7 +805,7 @@ export function EntitySettingsForm({
805
805
  <SelectContent>
806
806
  {SUPPORTED_LOCALES.map((locale) => (
807
807
  <SelectItem key={locale.value} value={locale.value}>
808
- {locale.label}
808
+ {translate(locale.label)}
809
809
  </SelectItem>
810
810
  ))}
811
811
  </SelectContent>
@@ -38,6 +38,16 @@ export default {
38
38
  "Select currency": "Währung auswählen",
39
39
  "Select locale": "Gebietsschema auswählen",
40
40
  "Configure entity localization": "Lokalisierung konfigurieren",
41
+ "English (US)": "Englisch (US)",
42
+ "German (DE)": "Deutsch (DE)",
43
+ "Italian (IT)": "Italienisch (IT)",
44
+ "French (FR)": "Französisch (FR)",
45
+ "Spanish (ES)": "Spanisch (ES)",
46
+ "Portuguese (Portugal)": "Portugiesisch (Portugal)",
47
+ Dutch: "Niederländisch",
48
+ Polish: "Polnisch",
49
+ Croatian: "Kroatisch",
50
+ "Slovenian (SI)": "Slowenisch (SI)",
41
51
  "Email Settings": "E-Mail-Einstellungen",
42
52
  "Configure email settings for invoices": "Konfigurieren Sie E-Mail-Einstellungen für Rechnungen",
43
53
  "Email Address": "E-Mail-Adresse",
@@ -37,6 +37,16 @@ export default {
37
37
  "Select currency": "Seleccionar moneda",
38
38
  "Select locale": "Seleccionar configuración regional",
39
39
  "Configure entity localization": "Configurar la localización de la entidad",
40
+ "English (US)": "Inglés (US)",
41
+ "German (DE)": "Alemán (DE)",
42
+ "Italian (IT)": "Italiano (IT)",
43
+ "French (FR)": "Francés (FR)",
44
+ "Spanish (ES)": "Español (ES)",
45
+ "Portuguese (Portugal)": "Portugués (Portugal)",
46
+ Dutch: "Neerlandés",
47
+ Polish: "Polaco",
48
+ Croatian: "Croata",
49
+ "Slovenian (SI)": "Esloveno (SI)",
40
50
  "Email Settings": "Configuración de email",
41
51
  "Configure email settings for invoices": "Configurar las opciones de email para las facturas",
42
52
  "Email Address": "Dirección de email",
@@ -37,6 +37,16 @@ export default {
37
37
  "Select currency": "Sélectionner la devise",
38
38
  "Select locale": "Sélectionner les paramètres régionaux",
39
39
  "Configure entity localization": "Configurer la localisation de l'entité",
40
+ "English (US)": "Anglais (US)",
41
+ "German (DE)": "Allemand (DE)",
42
+ "Italian (IT)": "Italien (IT)",
43
+ "French (FR)": "Français (FR)",
44
+ "Spanish (ES)": "Espagnol (ES)",
45
+ "Portuguese (Portugal)": "Portugais (Portugal)",
46
+ Dutch: "Néerlandais",
47
+ Polish: "Polonais",
48
+ Croatian: "Croate",
49
+ "Slovenian (SI)": "Slovène (SI)",
40
50
  "Email Settings": "Paramètres email",
41
51
  "Configure email settings for invoices": "Configurer les paramètres email pour les factures",
42
52
  "Email Address": "Adresse email",
@@ -37,6 +37,16 @@ export default {
37
37
  "Select currency": "Odaberite valutu",
38
38
  "Select locale": "Odaberite regionalne postavke",
39
39
  "Configure entity localization": "Konfigurirajte lokalizaciju subjekta",
40
+ "English (US)": "Engleski (US)",
41
+ "German (DE)": "Njemački (DE)",
42
+ "Italian (IT)": "Talijanski (IT)",
43
+ "French (FR)": "Francuski (FR)",
44
+ "Spanish (ES)": "Španjolski (ES)",
45
+ "Portuguese (Portugal)": "Portugalski (Portugal)",
46
+ Dutch: "Nizozemski",
47
+ Polish: "Poljski",
48
+ Croatian: "Hrvatski",
49
+ "Slovenian (SI)": "Slovenski (SI)",
40
50
  "Email Settings": "Postavke e-pošte",
41
51
  "Configure email settings for invoices": "Konfigurirajte postavke e-pošte za račune",
42
52
  "Email Address": "Adresa e-pošte",
@@ -37,6 +37,16 @@ export default {
37
37
  "Select currency": "Seleziona valuta",
38
38
  "Select locale": "Seleziona localizzazione",
39
39
  "Configure entity localization": "Configura la localizzazione dell'entità",
40
+ "English (US)": "Inglese (US)",
41
+ "German (DE)": "Tedesco (DE)",
42
+ "Italian (IT)": "Italiano (IT)",
43
+ "French (FR)": "Francese (FR)",
44
+ "Spanish (ES)": "Spagnolo (ES)",
45
+ "Portuguese (Portugal)": "Portoghese (Portogallo)",
46
+ Dutch: "Olandese",
47
+ Polish: "Polacco",
48
+ Croatian: "Croato",
49
+ "Slovenian (SI)": "Sloveno (SI)",
40
50
  "Email Settings": "Impostazioni email",
41
51
  "Configure email settings for invoices": "Configura le impostazioni email per le fatture",
42
52
  "Email Address": "Indirizzo email",
@@ -37,6 +37,16 @@ export default {
37
37
  "Select currency": "Valuta selecteren",
38
38
  "Select locale": "Landinstelling selecteren",
39
39
  "Configure entity localization": "Lokalisatie van de entiteit configureren",
40
+ "English (US)": "Engels (US)",
41
+ "German (DE)": "Duits (DE)",
42
+ "Italian (IT)": "Italiaans (IT)",
43
+ "French (FR)": "Frans (FR)",
44
+ "Spanish (ES)": "Spaans (ES)",
45
+ "Portuguese (Portugal)": "Portugees (Portugal)",
46
+ Dutch: "Nederlands",
47
+ Polish: "Pools",
48
+ Croatian: "Kroatisch",
49
+ "Slovenian (SI)": "Sloveens (SI)",
40
50
  "Email Settings": "E-mailinstellingen",
41
51
  "Configure email settings for invoices": "E-mailinstellingen configureren voor facturen",
42
52
  "Email Address": "E-mailadres",
@@ -37,6 +37,16 @@ export default {
37
37
  "Select currency": "Wybierz walutę",
38
38
  "Select locale": "Wybierz ustawienia regionalne",
39
39
  "Configure entity localization": "Skonfiguruj lokalizację podmiotu",
40
+ "English (US)": "Angielski (US)",
41
+ "German (DE)": "Niemiecki (DE)",
42
+ "Italian (IT)": "Włoski (IT)",
43
+ "French (FR)": "Francuski (FR)",
44
+ "Spanish (ES)": "Hiszpański (ES)",
45
+ "Portuguese (Portugal)": "Portugalski (Portugalia)",
46
+ Dutch: "Niderlandzki",
47
+ Polish: "Polski",
48
+ Croatian: "Chorwacki",
49
+ "Slovenian (SI)": "Słoweński (SI)",
40
50
  "Email Settings": "Ustawienia email",
41
51
  "Configure email settings for invoices": "Skonfiguruj ustawienia email dla faktur",
42
52
  "Email Address": "Adres email",
@@ -37,6 +37,16 @@ export default {
37
37
  "Select currency": "Selecionar moeda",
38
38
  "Select locale": "Selecionar configuração regional",
39
39
  "Configure entity localization": "Configurar a localização da entidade",
40
+ "English (US)": "Inglês (US)",
41
+ "German (DE)": "Alemão (DE)",
42
+ "Italian (IT)": "Italiano (IT)",
43
+ "French (FR)": "Francês (FR)",
44
+ "Spanish (ES)": "Espanhol (ES)",
45
+ "Portuguese (Portugal)": "Português (Portugal)",
46
+ Dutch: "Neerlandês",
47
+ Polish: "Polaco",
48
+ Croatian: "Croata",
49
+ "Slovenian (SI)": "Esloveno (SI)",
40
50
  "Email Settings": "Definições de email",
41
51
  "Configure email settings for invoices": "Configurar as definições de email para as faturas",
42
52
  "Email Address": "Endereço de email",
@@ -37,6 +37,16 @@ export default {
37
37
  "Select currency": "Izberite valuto",
38
38
  "Select locale": "Izberite lokalnost",
39
39
  "Configure entity localization": "Konfigurirajte lokalizacijo pravne osebe",
40
+ "English (US)": "Angleščina (US)",
41
+ "German (DE)": "Nemščina (DE)",
42
+ "Italian (IT)": "Italijanščina (IT)",
43
+ "French (FR)": "Francoščina (FR)",
44
+ "Spanish (ES)": "Španščina (ES)",
45
+ "Portuguese (Portugal)": "Portugalščina (Portugalska)",
46
+ Dutch: "Nizozemščina",
47
+ Polish: "Poljščina",
48
+ Croatian: "Hrvaščina",
49
+ "Slovenian (SI)": "Slovenščina (SI)",
40
50
  "Email Settings": "Nastavitve e-pošte",
41
51
  "Configure email settings for invoices": "Konfigurirajte nastavitve e-pošte za račune",
42
52
  "Email Address": "Naslov e-pošte",
@@ -30,11 +30,11 @@ const translations = { sl, de } as const;
30
30
 
31
31
  const SUPPORTED_LOCALES = [
32
32
  { value: "en-US", label: "English (US)" },
33
- { value: "de-DE", label: "Deutsch (DE)" },
34
- { value: "it-IT", label: "Italiano (IT)" },
35
- { value: "fr-FR", label: "Français (FR)" },
36
- { value: "es-ES", label: "Español (ES)" },
37
- { value: "sl-SI", label: "Slovenščina (SI)" },
33
+ { value: "de-DE", label: "German (DE)" },
34
+ { value: "it-IT", label: "Italian (IT)" },
35
+ { value: "fr-FR", label: "French (FR)" },
36
+ { value: "es-ES", label: "Spanish (ES)" },
37
+ { value: "sl-SI", label: "Slovenian (SI)" },
38
38
  ] as const;
39
39
 
40
40
  const defaultsSettingsSchema = z.object({
@@ -206,7 +206,7 @@ export function DefaultsSettingsForm({
206
206
  <SelectContent>
207
207
  {SUPPORTED_LOCALES.map((loc) => (
208
208
  <SelectItem key={loc.value} value={loc.value}>
209
- {loc.label}
209
+ {t(loc.label)}
210
210
  </SelectItem>
211
211
  ))}
212
212
  </SelectContent>
@@ -17,4 +17,22 @@ export default {
17
17
  "Im Sandbox-Modus können E-Mails nur an verifizierte Teammitglieder dieses Kontos gesendet werden.",
18
18
  "PDF Language": "PDF-Sprache",
19
19
  Default: "Standard",
20
+ English: "Englisch",
21
+ German: "Deutsch",
22
+ Slovenian: "Slowenisch",
23
+ Italian: "Italienisch",
24
+ French: "Französisch",
25
+ Spanish: "Spanisch",
26
+ Portuguese: "Portugiesisch",
27
+ Dutch: "Niederländisch",
28
+ Polish: "Polnisch",
29
+ Croatian: "Kroatisch",
30
+ Swedish: "Schwedisch",
31
+ Finnish: "Finnisch",
32
+ Estonian: "Estnisch",
33
+ Bulgarian: "Bulgarisch",
34
+ Czech: "Tschechisch",
35
+ Slovak: "Slowakisch",
36
+ Norwegian: "Norwegisch",
37
+ Icelandic: "Isländisch",
20
38
  } as const;
@@ -17,4 +17,22 @@ export default {
17
17
  "En modo sandbox solo se pueden enviar correos a los miembros verificados del equipo de esta cuenta.",
18
18
  "PDF Language": "Idioma del PDF",
19
19
  Default: "Predeterminado",
20
+ English: "Inglés",
21
+ German: "Alemán",
22
+ Slovenian: "Esloveno",
23
+ Italian: "Italiano",
24
+ French: "Francés",
25
+ Spanish: "Español",
26
+ Portuguese: "Portugués",
27
+ Dutch: "Neerlandés",
28
+ Polish: "Polaco",
29
+ Croatian: "Croata",
30
+ Swedish: "Sueco",
31
+ Finnish: "Finlandés",
32
+ Estonian: "Estonio",
33
+ Bulgarian: "Búlgaro",
34
+ Czech: "Checo",
35
+ Slovak: "Eslovaco",
36
+ Norwegian: "Noruego",
37
+ Icelandic: "Islandés",
20
38
  } as const;
@@ -17,4 +17,22 @@ export default {
17
17
  "En mode sandbox, les e-mails ne peuvent être envoyés qu'aux membres vérifiés de l'équipe de ce compte.",
18
18
  "PDF Language": "Langue du PDF",
19
19
  Default: "Par défaut",
20
+ English: "Anglais",
21
+ German: "Allemand",
22
+ Slovenian: "Slovène",
23
+ Italian: "Italien",
24
+ French: "Français",
25
+ Spanish: "Espagnol",
26
+ Portuguese: "Portugais",
27
+ Dutch: "Néerlandais",
28
+ Polish: "Polonais",
29
+ Croatian: "Croate",
30
+ Swedish: "Suédois",
31
+ Finnish: "Finnois",
32
+ Estonian: "Estonien",
33
+ Bulgarian: "Bulgare",
34
+ Czech: "Tchèque",
35
+ Slovak: "Slovaque",
36
+ Norwegian: "Norvégien",
37
+ Icelandic: "Islandais",
20
38
  } as const;
@@ -16,4 +16,22 @@ export default {
16
16
  "Sandbox email warning": "U sandbox načinu e-mailovi se mogu slati samo verificiranim članovima tima ovog računa.",
17
17
  "PDF Language": "Jezik PDF-a",
18
18
  Default: "Zadano",
19
+ English: "Engleski",
20
+ German: "Njemački",
21
+ Slovenian: "Slovenski",
22
+ Italian: "Talijanski",
23
+ French: "Francuski",
24
+ Spanish: "Španjolski",
25
+ Portuguese: "Portugalski",
26
+ Dutch: "Nizozemski",
27
+ Polish: "Poljski",
28
+ Croatian: "Hrvatski",
29
+ Swedish: "Švedski",
30
+ Finnish: "Finski",
31
+ Estonian: "Estonski",
32
+ Bulgarian: "Bugarski",
33
+ Czech: "Češki",
34
+ Slovak: "Slovački",
35
+ Norwegian: "Norveški",
36
+ Icelandic: "Islandski",
19
37
  } as const;
@@ -17,4 +17,22 @@ export default {
17
17
  "In modalità sandbox è possibile inviare e-mail solo ai membri del team verificati di questo account.",
18
18
  "PDF Language": "Lingua del PDF",
19
19
  Default: "Predefinito",
20
+ English: "Inglese",
21
+ German: "Tedesco",
22
+ Slovenian: "Sloveno",
23
+ Italian: "Italiano",
24
+ French: "Francese",
25
+ Spanish: "Spagnolo",
26
+ Portuguese: "Portoghese",
27
+ Dutch: "Olandese",
28
+ Polish: "Polacco",
29
+ Croatian: "Croato",
30
+ Swedish: "Svedese",
31
+ Finnish: "Finlandese",
32
+ Estonian: "Estone",
33
+ Bulgarian: "Bulgaro",
34
+ Czech: "Ceco",
35
+ Slovak: "Slovacco",
36
+ Norwegian: "Norvegese",
37
+ Icelandic: "Islandese",
20
38
  } as const;
@@ -17,4 +17,22 @@ export default {
17
17
  "In sandbox-modus kunnen e-mails alleen worden verzonden naar geverifieerde teamleden van dit account.",
18
18
  "PDF Language": "PDF-taal",
19
19
  Default: "Standaard",
20
+ English: "Engels",
21
+ German: "Duits",
22
+ Slovenian: "Sloveens",
23
+ Italian: "Italiaans",
24
+ French: "Frans",
25
+ Spanish: "Spaans",
26
+ Portuguese: "Portugees",
27
+ Dutch: "Nederlands",
28
+ Polish: "Pools",
29
+ Croatian: "Kroatisch",
30
+ Swedish: "Zweeds",
31
+ Finnish: "Fins",
32
+ Estonian: "Ests",
33
+ Bulgarian: "Bulgaars",
34
+ Czech: "Tsjechisch",
35
+ Slovak: "Slowaaks",
36
+ Norwegian: "Noors",
37
+ Icelandic: "IJslands",
20
38
  } as const;
@@ -17,4 +17,22 @@ export default {
17
17
  "W trybie sandbox e-maile można wysyłać tylko do zweryfikowanych członków zespołu tego konta.",
18
18
  "PDF Language": "Język PDF",
19
19
  Default: "Domyślnie",
20
+ English: "Angielski",
21
+ German: "Niemiecki",
22
+ Slovenian: "Słoweński",
23
+ Italian: "Włoski",
24
+ French: "Francuski",
25
+ Spanish: "Hiszpański",
26
+ Portuguese: "Portugalski",
27
+ Dutch: "Niderlandzki",
28
+ Polish: "Polski",
29
+ Croatian: "Chorwacki",
30
+ Swedish: "Szwedzki",
31
+ Finnish: "Fiński",
32
+ Estonian: "Estoński",
33
+ Bulgarian: "Bułgarski",
34
+ Czech: "Czeski",
35
+ Slovak: "Słowacki",
36
+ Norwegian: "Norweski",
37
+ Icelandic: "Islandzki",
20
38
  } as const;
@@ -17,4 +17,22 @@ export default {
17
17
  "No modo sandbox, os e-mails só podem ser enviados para membros verificados da equipa desta conta.",
18
18
  "PDF Language": "Idioma do PDF",
19
19
  Default: "Padrão",
20
+ English: "Inglês",
21
+ German: "Alemão",
22
+ Slovenian: "Esloveno",
23
+ Italian: "Italiano",
24
+ French: "Francês",
25
+ Spanish: "Espanhol",
26
+ Portuguese: "Português",
27
+ Dutch: "Neerlandês",
28
+ Polish: "Polaco",
29
+ Croatian: "Croata",
30
+ Swedish: "Sueco",
31
+ Finnish: "Finlandês",
32
+ Estonian: "Estónio",
33
+ Bulgarian: "Búlgaro",
34
+ Czech: "Checo",
35
+ Slovak: "Eslovaco",
36
+ Norwegian: "Norueguês",
37
+ Icelandic: "Islandês",
20
38
  } as const;
@@ -16,4 +16,22 @@ export default {
16
16
  "Sandbox email warning": "V testnem načinu lahko pošiljate e-pošto samo verificiranim članom ekipe tega računa.",
17
17
  "PDF Language": "Jezik PDF-ja",
18
18
  Default: "Privzeto",
19
+ English: "Angleščina",
20
+ German: "Nemščina",
21
+ Slovenian: "Slovenščina",
22
+ Italian: "Italijanščina",
23
+ French: "Francoščina",
24
+ Spanish: "Španščina",
25
+ Portuguese: "Portugalščina",
26
+ Dutch: "Nizozemščina",
27
+ Polish: "Poljščina",
28
+ Croatian: "Hrvaščina",
29
+ Swedish: "Švedščina",
30
+ Finnish: "Finščina",
31
+ Estonian: "Estonščina",
32
+ Bulgarian: "Bolgarščina",
33
+ Czech: "Češčina",
34
+ Slovak: "Slovaščina",
35
+ Norwegian: "Norveščina",
36
+ Icelandic: "Islandščina",
19
37
  } as const;
@@ -47,23 +47,23 @@ const translations = { de, sl, it, fr, es, pt, nl, pl, hr } as const;
47
47
 
48
48
  const LOCALE_OPTIONS = [
49
49
  { value: "en-US", label: "English (US)" },
50
- { value: "de-DE", label: "Deutsch" },
51
- { value: "it-IT", label: "Italiano" },
52
- { value: "fr-FR", label: "Français" },
53
- { value: "es-ES", label: "Español" },
54
- { value: "sl-SI", label: "Slovenščina" },
55
- { value: "pt-PT", label: "Português" },
56
- { value: "nl-NL", label: "Nederlands" },
57
- { value: "pl-PL", label: "Polski" },
58
- { value: "hr-HR", label: "Hrvatski" },
59
- { value: "sv-SE", label: "Svenska" },
60
- { value: "fi-FI", label: "Suomi" },
61
- { value: "et-EE", label: "Eesti" },
62
- { value: "bg-BG", label: "Български" },
63
- { value: "cs-CZ", label: "Čeština" },
64
- { value: "sk-SK", label: "Slovenčina" },
65
- { value: "nb-NO", label: "Norsk bokmål" },
66
- { value: "is-IS", label: "Íslenska" },
50
+ { value: "de-DE", label: "German" },
51
+ { value: "it-IT", label: "Italian" },
52
+ { value: "fr-FR", label: "French" },
53
+ { value: "es-ES", label: "Spanish" },
54
+ { value: "sl-SI", label: "Slovenian" },
55
+ { value: "pt-PT", label: "Portuguese" },
56
+ { value: "nl-NL", label: "Dutch" },
57
+ { value: "pl-PL", label: "Polish" },
58
+ { value: "hr-HR", label: "Croatian" },
59
+ { value: "sv-SE", label: "Swedish" },
60
+ { value: "fi-FI", label: "Finnish" },
61
+ { value: "et-EE", label: "Estonian" },
62
+ { value: "bg-BG", label: "Bulgarian" },
63
+ { value: "cs-CZ", label: "Czech" },
64
+ { value: "sk-SK", label: "Slovak" },
65
+ { value: "nb-NO", label: "Norwegian" },
66
+ { value: "is-IS", label: "Icelandic" },
67
67
  ] as const;
68
68
 
69
69
  const DEFAULT_LANGUAGE_VALUE = "__default__";
@@ -138,7 +138,7 @@ export function SendEmailDialog({
138
138
  setLanguage(value ?? DEFAULT_LANGUAGE_VALUE);
139
139
  };
140
140
 
141
- const entityLocaleLabel = LOCALE_OPTIONS.find((option) => option.value === entityLocale)?.label ?? entityLocale;
141
+ const entityLocaleLabel = t(LOCALE_OPTIONS.find((option) => option.value === entityLocale)?.label ?? entityLocale);
142
142
  const defaultLanguageLabel = `${t("Default")} (${entityLocaleLabel})`;
143
143
 
144
144
  // Reset form and fetch customer email when dialog opens
@@ -290,7 +290,7 @@ export function SendEmailDialog({
290
290
  <SelectItem value={DEFAULT_LANGUAGE_VALUE}>{defaultLanguageLabel}</SelectItem>
291
291
  {LOCALE_OPTIONS.map((opt) => (
292
292
  <SelectItem key={opt.value} value={opt.value}>
293
- {opt.label}
293
+ {t(opt.label)}
294
294
  </SelectItem>
295
295
  ))}
296
296
  </SelectContent>
@@ -0,0 +1 @@
1
+ export { default as CreatePaymentForm } from "./create-payment-form";
@@ -258,7 +258,7 @@ export function RequestLogListTable({
258
258
  onValueChange={(value) =>
259
259
  onChangeParams?.({
260
260
  ...queryParams,
261
- filter_client_name: value === "all" ? undefined : value,
261
+ filter_client_name: !value || value === "all" ? undefined : value,
262
262
  prev_cursor: undefined,
263
263
  next_cursor: undefined,
264
264
  })
@@ -149,6 +149,7 @@ function SidebarProvider({
149
149
  {
150
150
  "--sidebar-width": SIDEBAR_WIDTH,
151
151
  "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
152
+ "--sidebar-shell-offset": "0px",
152
153
  ...style,
153
154
  } as React.CSSProperties
154
155
  }
@@ -244,8 +245,8 @@ function Sidebar({
244
245
  className={cn(
245
246
  "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
246
247
  side === "left"
247
- ? "left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]"
248
- : "right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]",
248
+ ? "left-[var(--sidebar-shell-offset)] group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-shell-offset)-var(--sidebar-width))]"
249
+ : "right-[var(--sidebar-shell-offset)] group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-shell-offset)-var(--sidebar-width))]",
249
250
  // Adjust the padding for floating and inset variants.
250
251
  variant === "floating" || variant === "inset"
251
252
  ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"
@@ -26,8 +26,8 @@ async function main() {
26
26
  await fs.mkdir(SCHEMAS_DIR, { recursive: true });
27
27
  await fs.mkdir(GENERATED_DIR, { recursive: true });
28
28
 
29
- // Fetch OpenAPI spec from running API and generate schemas
30
- const API_URL = process.env.OPENAPI_TARGET || "http://localhost:3000/openapi.json";
29
+ // Default to the checked-in API spec so generation is deterministic across worktrees.
30
+ const API_URL = process.env.OPENAPI_TARGET || path.resolve(import.meta.dir, "../../../apps/api/openapi.json");
31
31
  const openApiPath = path.resolve(GENERATED_DIR, "openapi.json");
32
32
 
33
33
  try {
@@ -41,7 +41,7 @@ async function main() {
41
41
  console.log(`Copied OpenAPI spec from ${API_URL}`);
42
42
  }
43
43
  } catch (_error) {
44
- console.error(`Failed to fetch OpenAPI spec from ${API_URL}. Is the API running?`);
44
+ console.error(`Failed to fetch OpenAPI spec from ${API_URL}.`);
45
45
  process.exit(1);
46
46
  }
47
47
 
@@ -72,6 +72,56 @@ const createEntitySchemaDefinition = z.object({
72
72
  default_credit_note_payment_terms: z.union([z.string(), z.null()]),
73
73
  document_footer: z.union([z.string(), z.null()]),
74
74
  default_document_signature: z.union([z.string(), z.null()]),
75
+ slovenia: z.union([
76
+ z
77
+ .object({
78
+ business_form: z.union([
79
+ z.enum(["sp", "doo", "dno", "club"]),
80
+ z.null(),
81
+ ]),
82
+ income_tax_regime: z.union([
83
+ z.enum(["normirani", "dejanski"]),
84
+ z.null(),
85
+ ]),
86
+ vat_profile: z.union([
87
+ z.enum(["standard", "special_vat_identified"]),
88
+ z.null(),
89
+ ]),
90
+ tax_residency: z.union([
91
+ z.enum(["resident", "non_resident"]),
92
+ z.null(),
93
+ ]),
94
+ yearly_reporting: z.union([
95
+ z
96
+ .object({
97
+ activity_code: z.union([z.string(), z.null()]),
98
+ registration_number: z.union([z.string(), z.null()]),
99
+ accounting_type: z.union([
100
+ z.enum(["records", "single_entry", "double_entry"]),
101
+ z.null(),
102
+ ]),
103
+ normiranec_insurance_basis: z.union([
104
+ z.enum(["full_time_self_employed", "other"]),
105
+ z.null(),
106
+ ]),
107
+ default_withholding_tax_amount: z.union([
108
+ z.number(),
109
+ z.null(),
110
+ ]),
111
+ default_foreign_tax_credit_amount: z.union([
112
+ z.number(),
113
+ z.null(),
114
+ ]),
115
+ })
116
+ .partial()
117
+ .passthrough(),
118
+ z.null(),
119
+ ]),
120
+ })
121
+ .partial()
122
+ .passthrough(),
123
+ z.null(),
124
+ ]),
75
125
  furs: z.union([
76
126
  z
77
127
  .object({
@@ -245,6 +295,56 @@ const patchEntitySchemaDefinition = z
245
295
  default_credit_note_payment_terms: z.union([z.string(), z.null()]),
246
296
  document_footer: z.union([z.string(), z.null()]),
247
297
  default_document_signature: z.union([z.string(), z.null()]),
298
+ slovenia: z.union([
299
+ z
300
+ .object({
301
+ business_form: z.union([
302
+ z.enum(["sp", "doo", "dno", "club"]),
303
+ z.null(),
304
+ ]),
305
+ income_tax_regime: z.union([
306
+ z.enum(["normirani", "dejanski"]),
307
+ z.null(),
308
+ ]),
309
+ vat_profile: z.union([
310
+ z.enum(["standard", "special_vat_identified"]),
311
+ z.null(),
312
+ ]),
313
+ tax_residency: z.union([
314
+ z.enum(["resident", "non_resident"]),
315
+ z.null(),
316
+ ]),
317
+ yearly_reporting: z.union([
318
+ z
319
+ .object({
320
+ activity_code: z.union([z.string(), z.null()]),
321
+ registration_number: z.union([z.string(), z.null()]),
322
+ accounting_type: z.union([
323
+ z.enum(["records", "single_entry", "double_entry"]),
324
+ z.null(),
325
+ ]),
326
+ normiranec_insurance_basis: z.union([
327
+ z.enum(["full_time_self_employed", "other"]),
328
+ z.null(),
329
+ ]),
330
+ default_withholding_tax_amount: z.union([
331
+ z.number(),
332
+ z.null(),
333
+ ]),
334
+ default_foreign_tax_credit_amount: z.union([
335
+ z.number(),
336
+ z.null(),
337
+ ]),
338
+ })
339
+ .partial()
340
+ .passthrough(),
341
+ z.null(),
342
+ ]),
343
+ })
344
+ .partial()
345
+ .passthrough(),
346
+ z.null(),
347
+ ]),
248
348
  furs: z.union([
249
349
  z
250
350
  .object({
@@ -0,0 +1,27 @@
1
+ /**
2
+ * This file was automatically generated using 'bun generate-schemas'.
3
+ * Do not edit this file manually. To update, run the generator again.
4
+ * @generated
5
+ */
6
+
7
+ import { z } from 'zod';
8
+
9
+ // Schemas for exportsloveniayearlynormiranireport_body endpoints
10
+
11
+ // Dependency schema for exportsloveniayearlynormiranireport_body
12
+ const exportSloveniaYearlyNormiraniReport_Body = z
13
+ .object({
14
+ year: z.number().int().gte(2025).lte(2100),
15
+ manual_values: z
16
+ .object({
17
+ withholding_tax_amount: z.number().gte(0),
18
+ foreign_tax_credit_amount: z.number().gte(0),
19
+ prior_advance_income_tax_amount: z.number().gte(0),
20
+ revenue_adjustment_decrease: z.number().gte(0),
21
+ revenue_adjustment_increase: z.number().gte(0),
22
+ })
23
+ .passthrough(),
24
+ })
25
+ .passthrough();
26
+
27
+
@@ -19,6 +19,7 @@ export * from './entity';
19
19
  export * from './entityapikey';
20
20
  export * from './entityuserrole';
21
21
  export * from './estimate';
22
+ export * from './exportsloveniayearlynormiranireport_body';
22
23
  export * from './finasettings';
23
24
  export * from './furssettings';
24
25
  export * from './invoice';
@@ -42,6 +43,7 @@ export * from './renderestimatepreview_body';
42
43
  export * from './renderinvoicepreview_body';
43
44
  export * from './senddocument_body';
44
45
  export * from './sendemail_body';
46
+ export * from './sloveniataxprofile';
45
47
  export * from './startpdfexport_body';
46
48
  export * from './stripeappconnect_body';
47
49
  export * from './stripeappcreateinvoice_body';
@@ -0,0 +1,42 @@
1
+ /**
2
+ * This file was automatically generated using 'bun generate-schemas'.
3
+ * Do not edit this file manually. To update, run the generator again.
4
+ * @generated
5
+ */
6
+
7
+ import { z } from 'zod';
8
+
9
+ // Schemas for sloveniataxprofile endpoints
10
+
11
+ // Schema for update sloveniataxprofile operation
12
+ const updateSloveniaTaxProfileSchemaDefinition = z
13
+ .object({
14
+ business_form: z.enum(["sp", "doo", "dno", "club"]),
15
+ income_tax_regime: z.enum(["normirani", "dejanski"]),
16
+ vat_profile: z.enum(["standard", "special_vat_identified"]),
17
+ tax_residency: z.enum(["resident", "non_resident"]),
18
+ yearly_reporting: z
19
+ .object({
20
+ activity_code: z.union([z.string(), z.null()]),
21
+ registration_number: z.union([z.string(), z.null()]),
22
+ accounting_type: z.union([
23
+ z.enum(["records", "single_entry", "double_entry"]),
24
+ z.null(),
25
+ ]),
26
+ normiranec_insurance_basis: z.union([
27
+ z.enum(["full_time_self_employed", "other"]),
28
+ z.null(),
29
+ ]),
30
+ default_withholding_tax_amount: z.union([z.number(), z.null()]),
31
+ default_foreign_tax_credit_amount: z.union([z.number(), z.null()]),
32
+ })
33
+ .partial()
34
+ .passthrough(),
35
+ })
36
+ .partial()
37
+ .passthrough();
38
+
39
+ // Type for update sloveniataxprofile operation
40
+ export type UpdateSloveniaTaxProfileSchema = z.infer<typeof updateSloveniaTaxProfileSchemaDefinition>;
41
+
42
+ export const updateSloveniaTaxProfileSchema = updateSloveniaTaxProfileSchemaDefinition;