@innvoid/getmarket-contracts 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/auth.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/auth.ts"],"sourcesContent":["// packages/contracts/src/auth.ts\nimport type {UID, Code, RefBase, BulkUidsRequest, BulkRefsResponse} from \"./common\";\n\n/**\n * AUTH is SoT for identity, org structure and access.\n */\n\nexport type AuthUserRef = RefBase & {\n uid: UID; // auth_user_uid\n document_value?: string | null;\n document_type_id?: number | null;\n};\n\nexport type AuthEmployeeRef = RefBase & {\n uid: UID; // auth_employee_uid\n user_uid?: UID | null;\n email?: string | null;\n};\n\nexport type AuthCustomerRef = RefBase & {\n uid: UID; // auth_customer_uid\n user_uid?: UID | null;\n email?: string | null;\n};\n\nexport type AuthCompanyRef = RefBase & {\n uid: UID; // auth_company_uid\n document_value?: string | null;\n document_type_id?: number | null;\n fantasy_name?: string | null;\n status?: number | null;\n};\n\nexport type AuthBranchRef = RefBase & {\n uid: UID; // auth_branch_uid\n company_uid: UID;\n status?: number | null;\n};\n\nexport type AuthRoleRef = RefBase & {\n uid: UID;\n slug?: Code;\n};\n\nexport type AuthPermissionRef = RefBase & {\n uid: UID;\n slug?: Code;\n};\n\n// Bulk refs endpoints (internal)\nexport type AuthEmployeesRefsRequest = BulkUidsRequest;\nexport type AuthEmployeesRefsResponse = BulkRefsResponse<AuthEmployeeRef>;\n\nexport type AuthUsersRefsRequest = BulkUidsRequest;\nexport type AuthUsersRefsResponse = BulkRefsResponse<AuthUserRef>;\n\nexport type AuthCustomersRefsRequest = BulkUidsRequest;\nexport type AuthCustomersRefsResponse = BulkRefsResponse<AuthCustomerRef>;\n\nexport type AuthCompaniesRefsRequest = BulkUidsRequest;\nexport type AuthCompaniesRefsResponse = BulkRefsResponse<AuthCompanyRef>;\n\nexport type AuthBranchesRefsRequest = BulkUidsRequest;\nexport type AuthBranchesRefsResponse = BulkRefsResponse<AuthBranchRef>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../src/auth.ts"],"sourcesContent":["// packages/contracts/src/auth.ts\nimport type {UID, Code, RefBase, BulkUidsRequest, BulkRefsResponse} from \"./common\";\n\n/**\n * AUTH is SoT for identity, org structure and access.\n *\n * ✅ Estándar NO-LEGACY:\n * - Los otros microservicios SOLO referencian por `uid` (externo, estable).\n * - `id` numérico existe en DB interna de AUTH, pero NO se expone como FK cross-service.\n * - Si necesitas tipos externos (p.ej. document_type), se referencian por UID de su SoT (MD o FIS),\n * nunca por *_id cross-service.\n */\n\n// ----------------------------\n// Users / People\n// ----------------------------\nexport type AuthUserRef = RefBase & {\n uid: UID; // auth_user_uid\n\n // Si se usa identificación tributaria/ID nacional:\n document_value?: string | null;\n\n /**\n * ✅ Recomendado: UID hacia FIS (document types / identity types)\n * Ej: fis_document_type_uid\n */\n fis_document_type_uid?: UID | null;\n\n /**\n * ⚠️ Legacy (evitar en nuevo código):\n * document_type_id?: number | null;\n */\n};\n\nexport type AuthEmployeeRef = RefBase & {\n uid: UID; // auth_employee_uid\n user_uid?: UID | null;\n email?: string | null;\n status?: number | null;\n};\n\nexport type AuthCustomerRef = RefBase & {\n uid: UID; // auth_customer_uid\n user_uid?: UID | null;\n email?: string | null;\n status?: number | null;\n};\n\n// ----------------------------\n// Org structure\n// ----------------------------\nexport type AuthCompanyRef = RefBase & {\n uid: UID; // auth_company_uid\n\n document_value?: string | null;\n fis_document_type_uid?: UID | null;\n\n fantasy_name?: string | null;\n status?: number | null;\n};\n\nexport type AuthBranchRef = RefBase & {\n uid: UID; // auth_branch_uid\n company_uid: UID;\n status?: number | null;\n};\n\n// ----------------------------\n// Access control (RBAC/Permissions)\n// ----------------------------\nexport type AuthRoleRef = RefBase & {\n uid: UID; // auth_role_uid\n code?: Code; // ej: \"SYS_ADMIN\" (si lo defines)\n slug?: Code; // si ya lo ocupas como \"code\" humano\n status?: number | null;\n};\n\nexport type AuthPermissionRef = RefBase & {\n uid: UID; // auth_permission_uid\n code?: Code; // ej: \"company.read\"\n slug?: Code; // si ya lo ocupas como \"code\" humano\n status?: number | null;\n};\n\n// ----------------------------\n// Bulk refs endpoints (internal)\n// ----------------------------\nexport type AuthEmployeesRefsRequest = BulkUidsRequest;\nexport type AuthEmployeesRefsResponse = BulkRefsResponse<AuthEmployeeRef>;\n\nexport type AuthUsersRefsRequest = BulkUidsRequest;\nexport type AuthUsersRefsResponse = BulkRefsResponse<AuthUserRef>;\n\nexport type AuthCustomersRefsRequest = BulkUidsRequest;\nexport type AuthCustomersRefsResponse = BulkRefsResponse<AuthCustomerRef>;\n\nexport type AuthCompaniesRefsRequest = BulkUidsRequest;\nexport type AuthCompaniesRefsResponse = BulkRefsResponse<AuthCompanyRef>;\n\nexport type AuthBranchesRefsRequest = BulkUidsRequest;\nexport type AuthBranchesRefsResponse = BulkRefsResponse<AuthBranchRef>;\n\nexport type AuthRolesRefsRequest = BulkUidsRequest;\nexport type AuthRolesRefsResponse = BulkRefsResponse<AuthRoleRef>;\n\nexport type AuthPermissionsRefsRequest = BulkUidsRequest;\nexport type AuthPermissionsRefsResponse = BulkRefsResponse<AuthPermissionRef>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
package/dist/auth.d.cts CHANGED
@@ -2,26 +2,38 @@ import { RefBase, UID, BulkUidsRequest, BulkRefsResponse, Code } from './common.
2
2
 
3
3
  /**
4
4
  * AUTH is SoT for identity, org structure and access.
5
+ *
6
+ * ✅ Estándar NO-LEGACY:
7
+ * - Los otros microservicios SOLO referencian por `uid` (externo, estable).
8
+ * - `id` numérico existe en DB interna de AUTH, pero NO se expone como FK cross-service.
9
+ * - Si necesitas tipos externos (p.ej. document_type), se referencian por UID de su SoT (MD o FIS),
10
+ * nunca por *_id cross-service.
5
11
  */
6
12
  type AuthUserRef = RefBase & {
7
13
  uid: UID;
8
14
  document_value?: string | null;
9
- document_type_id?: number | null;
15
+ /**
16
+ * ✅ Recomendado: UID hacia FIS (document types / identity types)
17
+ * Ej: fis_document_type_uid
18
+ */
19
+ fis_document_type_uid?: UID | null;
10
20
  };
11
21
  type AuthEmployeeRef = RefBase & {
12
22
  uid: UID;
13
23
  user_uid?: UID | null;
14
24
  email?: string | null;
25
+ status?: number | null;
15
26
  };
16
27
  type AuthCustomerRef = RefBase & {
17
28
  uid: UID;
18
29
  user_uid?: UID | null;
19
30
  email?: string | null;
31
+ status?: number | null;
20
32
  };
21
33
  type AuthCompanyRef = RefBase & {
22
34
  uid: UID;
23
35
  document_value?: string | null;
24
- document_type_id?: number | null;
36
+ fis_document_type_uid?: UID | null;
25
37
  fantasy_name?: string | null;
26
38
  status?: number | null;
27
39
  };
@@ -32,11 +44,15 @@ type AuthBranchRef = RefBase & {
32
44
  };
33
45
  type AuthRoleRef = RefBase & {
34
46
  uid: UID;
47
+ code?: Code;
35
48
  slug?: Code;
49
+ status?: number | null;
36
50
  };
37
51
  type AuthPermissionRef = RefBase & {
38
52
  uid: UID;
53
+ code?: Code;
39
54
  slug?: Code;
55
+ status?: number | null;
40
56
  };
41
57
  type AuthEmployeesRefsRequest = BulkUidsRequest;
42
58
  type AuthEmployeesRefsResponse = BulkRefsResponse<AuthEmployeeRef>;
@@ -48,5 +64,9 @@ type AuthCompaniesRefsRequest = BulkUidsRequest;
48
64
  type AuthCompaniesRefsResponse = BulkRefsResponse<AuthCompanyRef>;
49
65
  type AuthBranchesRefsRequest = BulkUidsRequest;
50
66
  type AuthBranchesRefsResponse = BulkRefsResponse<AuthBranchRef>;
67
+ type AuthRolesRefsRequest = BulkUidsRequest;
68
+ type AuthRolesRefsResponse = BulkRefsResponse<AuthRoleRef>;
69
+ type AuthPermissionsRefsRequest = BulkUidsRequest;
70
+ type AuthPermissionsRefsResponse = BulkRefsResponse<AuthPermissionRef>;
51
71
 
52
- export type { AuthBranchRef, AuthBranchesRefsRequest, AuthBranchesRefsResponse, AuthCompaniesRefsRequest, AuthCompaniesRefsResponse, AuthCompanyRef, AuthCustomerRef, AuthCustomersRefsRequest, AuthCustomersRefsResponse, AuthEmployeeRef, AuthEmployeesRefsRequest, AuthEmployeesRefsResponse, AuthPermissionRef, AuthRoleRef, AuthUserRef, AuthUsersRefsRequest, AuthUsersRefsResponse };
72
+ export type { AuthBranchRef, AuthBranchesRefsRequest, AuthBranchesRefsResponse, AuthCompaniesRefsRequest, AuthCompaniesRefsResponse, AuthCompanyRef, AuthCustomerRef, AuthCustomersRefsRequest, AuthCustomersRefsResponse, AuthEmployeeRef, AuthEmployeesRefsRequest, AuthEmployeesRefsResponse, AuthPermissionRef, AuthPermissionsRefsRequest, AuthPermissionsRefsResponse, AuthRoleRef, AuthRolesRefsRequest, AuthRolesRefsResponse, AuthUserRef, AuthUsersRefsRequest, AuthUsersRefsResponse };
package/dist/auth.d.ts CHANGED
@@ -2,26 +2,38 @@ import { RefBase, UID, BulkUidsRequest, BulkRefsResponse, Code } from './common.
2
2
 
3
3
  /**
4
4
  * AUTH is SoT for identity, org structure and access.
5
+ *
6
+ * ✅ Estándar NO-LEGACY:
7
+ * - Los otros microservicios SOLO referencian por `uid` (externo, estable).
8
+ * - `id` numérico existe en DB interna de AUTH, pero NO se expone como FK cross-service.
9
+ * - Si necesitas tipos externos (p.ej. document_type), se referencian por UID de su SoT (MD o FIS),
10
+ * nunca por *_id cross-service.
5
11
  */
6
12
  type AuthUserRef = RefBase & {
7
13
  uid: UID;
8
14
  document_value?: string | null;
9
- document_type_id?: number | null;
15
+ /**
16
+ * ✅ Recomendado: UID hacia FIS (document types / identity types)
17
+ * Ej: fis_document_type_uid
18
+ */
19
+ fis_document_type_uid?: UID | null;
10
20
  };
11
21
  type AuthEmployeeRef = RefBase & {
12
22
  uid: UID;
13
23
  user_uid?: UID | null;
14
24
  email?: string | null;
25
+ status?: number | null;
15
26
  };
16
27
  type AuthCustomerRef = RefBase & {
17
28
  uid: UID;
18
29
  user_uid?: UID | null;
19
30
  email?: string | null;
31
+ status?: number | null;
20
32
  };
21
33
  type AuthCompanyRef = RefBase & {
22
34
  uid: UID;
23
35
  document_value?: string | null;
24
- document_type_id?: number | null;
36
+ fis_document_type_uid?: UID | null;
25
37
  fantasy_name?: string | null;
26
38
  status?: number | null;
27
39
  };
@@ -32,11 +44,15 @@ type AuthBranchRef = RefBase & {
32
44
  };
33
45
  type AuthRoleRef = RefBase & {
34
46
  uid: UID;
47
+ code?: Code;
35
48
  slug?: Code;
49
+ status?: number | null;
36
50
  };
37
51
  type AuthPermissionRef = RefBase & {
38
52
  uid: UID;
53
+ code?: Code;
39
54
  slug?: Code;
55
+ status?: number | null;
40
56
  };
41
57
  type AuthEmployeesRefsRequest = BulkUidsRequest;
42
58
  type AuthEmployeesRefsResponse = BulkRefsResponse<AuthEmployeeRef>;
@@ -48,5 +64,9 @@ type AuthCompaniesRefsRequest = BulkUidsRequest;
48
64
  type AuthCompaniesRefsResponse = BulkRefsResponse<AuthCompanyRef>;
49
65
  type AuthBranchesRefsRequest = BulkUidsRequest;
50
66
  type AuthBranchesRefsResponse = BulkRefsResponse<AuthBranchRef>;
67
+ type AuthRolesRefsRequest = BulkUidsRequest;
68
+ type AuthRolesRefsResponse = BulkRefsResponse<AuthRoleRef>;
69
+ type AuthPermissionsRefsRequest = BulkUidsRequest;
70
+ type AuthPermissionsRefsResponse = BulkRefsResponse<AuthPermissionRef>;
51
71
 
52
- export type { AuthBranchRef, AuthBranchesRefsRequest, AuthBranchesRefsResponse, AuthCompaniesRefsRequest, AuthCompaniesRefsResponse, AuthCompanyRef, AuthCustomerRef, AuthCustomersRefsRequest, AuthCustomersRefsResponse, AuthEmployeeRef, AuthEmployeesRefsRequest, AuthEmployeesRefsResponse, AuthPermissionRef, AuthRoleRef, AuthUserRef, AuthUsersRefsRequest, AuthUsersRefsResponse };
72
+ export type { AuthBranchRef, AuthBranchesRefsRequest, AuthBranchesRefsResponse, AuthCompaniesRefsRequest, AuthCompaniesRefsResponse, AuthCompanyRef, AuthCustomerRef, AuthCustomersRefsRequest, AuthCustomersRefsResponse, AuthEmployeeRef, AuthEmployeesRefsRequest, AuthEmployeesRefsResponse, AuthPermissionRef, AuthPermissionsRefsRequest, AuthPermissionsRefsResponse, AuthRoleRef, AuthRolesRefsRequest, AuthRolesRefsResponse, AuthUserRef, AuthUsersRefsRequest, AuthUsersRefsResponse };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/common.ts"],"sourcesContent":["// packages/contracts/src/common.ts\n\n// primitives (small, reusable)\nexport type UID = string;\nexport type Code = string;\n\nexport type RefBase = {\n uid: UID;\n code?: Code;\n name?: string;\n};\n\n/**\n * Common bulk request/response for internal refs endpoints.\n *\n * Convention:\n * - Request: { uids: [...] }\n * - Response: { ok:true, refs:[...] }\n */\nexport type BulkUidsRequest = {\n uids: UID[];\n};\n\n/**\n * Standard response for internal/bulk refs endpoints.\n *\n * Canonical field is `refs`.\n * - `items` is kept as an optional alias for backward compatibility.\n */\nexport type BulkRefsResponse<T> = {\n ok: true;\n\n /** Canonical payload */\n refs: T[];\n\n /** Backward-compatible alias (avoid using in new code) */\n items?: T[];\n\n /** Optional diagnostics */\n meta?: {\n requested?: number;\n returned?: number;\n missing?: UID[];\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../src/common.ts"],"sourcesContent":["// packages/contracts/src/common.ts\n\n// primitives (small, reusable)\nexport type UID = string;\nexport type Code = string;\n\nexport type RefBase = {\n uid: UID;\n code?: Code;\n name?: string;\n};\n\n/**\n * Common bulk request/response for internal refs endpoints.\n *\n * Convention:\n * - Request: { uids: [...] }\n * - Response: { ok:true, refs:[...] }\n */\nexport type BulkUidsRequest = {\n uids: UID[];\n};\n\n/**\n * Standard response for internal/bulk refs endpoints.\n *\n * Canonical field is `refs`.\n * - `items` is kept as an optional alias for backward compatibility.\n */\nexport type BulkRefsResponse<T> = {\n ok: true;\n\n /** Canonical payload */\n refs: T[];\n\n /** Backward-compatible alias (avoid using in new code) */\n items?: T[];\n\n /** Optional diagnostics */\n meta?: {\n requested?: number;\n returned?: number;\n missing?: UID[];\n };\n};\n\n// common.ts\nexport type ISODateTime = string; // ISO-8601, ej: \"2026-03-04T12:34:56.000Z\"\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
package/dist/common.d.cts CHANGED
@@ -34,5 +34,6 @@ type BulkRefsResponse<T> = {
34
34
  missing?: UID[];
35
35
  };
36
36
  };
37
+ type ISODateTime = string;
37
38
 
38
- export type { BulkRefsResponse, BulkUidsRequest, Code, RefBase, UID };
39
+ export type { BulkRefsResponse, BulkUidsRequest, Code, ISODateTime, RefBase, UID };
package/dist/common.d.ts CHANGED
@@ -34,5 +34,6 @@ type BulkRefsResponse<T> = {
34
34
  missing?: UID[];
35
35
  };
36
36
  };
37
+ type ISODateTime = string;
37
38
 
38
- export type { BulkRefsResponse, BulkUidsRequest, Code, RefBase, UID };
39
+ export type { BulkRefsResponse, BulkUidsRequest, Code, ISODateTime, RefBase, UID };
package/dist/fis.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/fis.ts"],"sourcesContent":["// packages/contracts/src/fis.ts\nimport type {UID, Code, RefBase, BulkUidsRequest, BulkRefsResponse} from \"./common\";\n\n/**\n * FISCAL is SoT for taxes/compliance.\n * Must reference md_country_code/region codes from master-data.\n */\n\nexport type FisTaxRef = RefBase & {\n uid: UID; // fis_tax_uid\n code?: Code; // IVA_CL, VAT, etc.\n name?: string;\n rate?: number; // 0.19\n md_country_code?: Code; // CL\n md_region_code?: Code; // optional\n status?: \"ACTIVE\" | \"INACTIVE\" | string;\n};\n\nexport type FisTaxesRefsRequest = BulkUidsRequest;\nexport type FisTaxesRefsResponse = BulkRefsResponse<FisTaxRef>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../src/fis.ts"],"sourcesContent":["// packages/contracts/src/fis.ts\nimport type {UID, Code, RefBase, BulkUidsRequest, BulkRefsResponse, ISODateTime} from \"./common\";\n\n/**\n * FISCAL is SoT for taxes/compliance.\n * References master-data by md_*_uid.\n */\n\n// -------------------------------------------------------------------------------------------------\n// Enums / Core types\n// -------------------------------------------------------------------------------------------------\n\nexport type FisStatus = \"ACTIVE\" | \"INACTIVE\" | \"DRAFT\" | \"ARCHIVED\" | string;\n\nexport type FisDirection = \"SALE\" | \"PURCHASE\" | string;\n\nexport type FisTaxType =\n | \"VAT\"\n | \"WITHHOLDING\"\n | \"EXEMPTION\"\n | \"FEE\"\n | \"OTHER\"\n | string;\n\nexport type FisRoundingMode = \"HALF_UP\" | \"HALF_EVEN\" | \"DOWN\" | \"UP\" | string;\n\n// rate representation best-practice\nexport type FisRate = {\n rate?: number | null; // 0.19\n rate_bp?: number | null; // 1900\n};\n\n// -------------------------------------------------------------------------------------------------\n// References (Refs)\n// -------------------------------------------------------------------------------------------------\n\nexport type FisTaxRef = RefBase & {\n uid: UID; // fis_tax_uid\n code?: Code;\n name?: string;\n\n type?: FisTaxType;\n\n // SIN SPREAD: mergeamos como intersección\n} & FisRate & {\n // SoT location scoping (MD)\n md_country_uid?: UID | null;\n md_region_uid?: UID | null;\n md_commune_uid?: UID | null;\n\n // flags\n is_included_in_price?: boolean | null;\n is_compound?: boolean | null;\n status?: FisStatus;\n};\n\nexport type FisTaxesRefsRequest = BulkUidsRequest;\nexport type FisTaxesRefsResponse = BulkRefsResponse<FisTaxRef>;\n\n// -------------------------------------------------------------------------------------------------\n// Tax Rules\n// -------------------------------------------------------------------------------------------------\n\nexport type FisTaxRuleTarget = {\n auth_company_uid?: UID | null;\n auth_branch_uid?: UID | null;\n\n md_country_uid?: UID | null;\n md_region_uid?: UID | null;\n md_commune_uid?: UID | null;\n\n counterparty_uid?: UID | null;\n\n res_resource_uid?: UID | null;\n res_category_uid?: UID | null;\n res_variety_uid?: UID | null;\n\n tags?: Code[] | null;\n};\n\nexport type FisTaxRule = {\n uid: UID; // fis_tax_rule_uid\n code?: Code;\n name?: string;\n status?: FisStatus;\n\n priority?: number;\n direction?: FisDirection;\n\n fis_tax_uid: UID;\n\n rounding_mode?: FisRoundingMode;\n min_amount?: number | null;\n max_amount?: number | null;\n\n target?: FisTaxRuleTarget;\n\n valid_from?: ISODateTime | null;\n valid_to?: ISODateTime | null;\n};\n\n// -------------------------------------------------------------------------------------------------\n// Calculation Snapshot\n// -------------------------------------------------------------------------------------------------\n\nexport type FisTaxLineSnapshot = {\n fis_tax_uid: UID;\n\n tax_code?: Code | null;\n tax_name?: string | null;\n\n rate?: number | null;\n rate_bp?: number | null;\n\n base_amount: number;\n tax_amount: number;\n\n md_country_uid?: UID | null;\n md_region_uid?: UID | null;\n\n meta?: Record<string, any> | null;\n};\n\nexport type FisDocumentTotalsSnapshot = {\n currency_uid?: UID | null; // md_currency_uid\n currency_code?: Code | null; // display\n\n net_amount?: number | null;\n exempt_amount?: number | null;\n tax_amount?: number | null;\n total_amount: number;\n\n rounding_amount?: number | null;\n\n taxes: FisTaxLineSnapshot[];\n};\n\nexport type FisTaxCalculationSnapshot = {\n uid: UID; // fis_tax_snapshot_uid\n status?: FisStatus;\n\n idempotency_key?: string | null;\n request_id?: string | null;\n\n auth_company_uid?: UID | null;\n auth_branch_uid?: UID | null;\n auth_employee_uid?: UID | null;\n\n direction: FisDirection;\n md_country_uid?: UID | null;\n md_region_uid?: UID | null;\n md_commune_uid?: UID | null;\n\n source_service?: Code | null;\n source_uid?: UID | null;\n\n totals: FisDocumentTotalsSnapshot;\n\n created_at?: ISODateTime;\n};\n\n// -------------------------------------------------------------------------------------------------\n// Requests: Tax Calculate\n// -------------------------------------------------------------------------------------------------\n\nexport type FisLineForTaxCalc = {\n line_uid?: UID | null;\n\n res_variety_uid?: UID | null;\n res_resource_uid?: UID | null;\n res_category_uid?: UID | null;\n\n description?: string | null;\n\n quantity?: number | null;\n unit_price?: number | null;\n\n md_measure_uid?: UID | null;\n md_measure_code?: Code | null;\n\n discount_amount?: number | null;\n discount_percent?: number | null;\n\n tags?: Code[] | null;\n meta?: Record<string, any> | null;\n};\n\nexport type FisTaxCalculateRequest = {\n idempotency_key: string;\n\n auth_company_uid?: UID | null;\n auth_branch_uid?: UID | null;\n auth_employee_uid?: UID | null;\n\n direction: FisDirection;\n\n md_country_uid: UID;\n md_region_uid?: UID | null;\n md_commune_uid?: UID | null;\n\n md_currency_uid?: UID | null;\n\n counterparty_uid?: UID | null;\n\n source_service?: Code | null;\n source_uid?: UID | null;\n\n lines: FisLineForTaxCalc[];\n\n rounding_mode?: FisRoundingMode;\n prices_include_tax?: boolean | null;\n\n meta?: Record<string, any> | null;\n};\n\nexport type FisTaxCalculateResponse = {\n ok: boolean;\n snapshot: FisTaxCalculationSnapshot;\n};\n\n// -------------------------------------------------------------------------------------------------\n// Fiscal Documents\n// -------------------------------------------------------------------------------------------------\n\nexport type FisDocType =\n | \"INVOICE\"\n | \"RECEIPT\"\n | \"CREDIT_NOTE\"\n | \"DEBIT_NOTE\"\n | \"DISPATCH_GUIDE\"\n | \"OTHER\"\n | string;\n\nexport type FisDocLifecycleStatus =\n | \"DRAFT\"\n | \"PENDING_SUBMISSION\"\n | \"SUBMITTED\"\n | \"ACCEPTED\"\n | \"REJECTED\"\n | \"CANCELLED\"\n | \"VOIDED\"\n | string;\n\nexport type FisFiscalDocumentRef = RefBase & {\n uid: UID; // fis_document_uid\n\n auth_company_uid?: UID | null;\n auth_branch_uid?: UID | null;\n\n direction?: FisDirection;\n doc_type?: FisDocType;\n\n series?: string | null;\n folio?: number | null;\n external_uuid?: string | null;\n\n md_country_uid?: UID | null;\n\n status?: FisDocLifecycleStatus;\n\n issued_at?: ISODateTime | null;\n created_at?: ISODateTime | null;\n};\n\nexport type FisIssueRequest = {\n idempotency_key: string;\n\n auth_company_uid: UID;\n auth_branch_uid?: UID | null;\n auth_employee_uid?: UID | null;\n\n direction: FisDirection;\n doc_type: FisDocType;\n\n md_country_uid: UID;\n md_region_uid?: UID | null;\n md_commune_uid?: UID | null;\n\n source_service?: Code | null;\n source_uid?: UID | null;\n\n fis_tax_snapshot_uid: UID;\n\n counterparty_uid?: UID | null;\n\n attachments?: { kind: Code; file_uid: UID }[] | null;\n\n meta?: Record<string, any> | null;\n};\n\nexport type FisIssueResponse = {\n ok: boolean;\n document: FisFiscalDocumentRef;\n};\n\nexport type FisCancelRequest = {\n idempotency_key: string;\n fis_document_uid: UID;\n reason?: string | null;\n\n auth_employee_uid?: UID | null;\n meta?: Record<string, any> | null;\n};\n\nexport type FisCancelResponse = {\n ok: boolean;\n document: FisFiscalDocumentRef;\n};\n\n// -------------------------------------------------------------------------------------------------\n// Submissions\n// -------------------------------------------------------------------------------------------------\n\nexport type FisSubmissionStatus =\n | \"PENDING\"\n | \"SENT\"\n | \"ACKED\"\n | \"ACCEPTED\"\n | \"REJECTED\"\n | \"ERROR\"\n | string;\n\nexport type FisSubmissionRef = RefBase & {\n uid: UID; // fis_submission_uid\n\n auth_company_uid?: UID | null;\n md_country_uid?: UID | null;\n\n status?: FisSubmissionStatus;\n external_tracking_id?: string | null;\n\n created_at?: ISODateTime | null;\n updated_at?: ISODateTime | null;\n};\n\nexport type FisSubmitRequest = {\n idempotency_key: string;\n\n fis_document_uids: UID[];\n\n auth_company_uid?: UID | null;\n md_country_uid?: UID | null;\n\n meta?: Record<string, any> | null;\n};\n\nexport type FisSubmitResponse = {\n ok: boolean;\n submission: FisSubmissionRef;\n};\n\nexport type FisSubmissionStatusResponse = {\n ok: boolean;\n submission: FisSubmissionRef;\n items?: {\n fis_document_uid: UID;\n status: FisSubmissionStatus;\n message?: string | null;\n external_tracking_id?: string | null;\n }[];\n};\n\n// -------------------------------------------------------------------------------------------------\n// Bulk refs\n// -------------------------------------------------------------------------------------------------\n\nexport type FisDocumentsRefsRequest = BulkUidsRequest;\nexport type FisDocumentsRefsResponse = BulkRefsResponse<FisFiscalDocumentRef>;\n\nexport type FisSubmissionsRefsRequest = BulkUidsRequest;\nexport type FisSubmissionsRefsResponse = BulkRefsResponse<FisSubmissionRef>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
package/dist/fis.d.cts CHANGED
@@ -1,19 +1,220 @@
1
- import { RefBase, UID, Code, BulkUidsRequest, BulkRefsResponse } from './common.cjs';
1
+ import { UID, RefBase, ISODateTime, Code, BulkUidsRequest, BulkRefsResponse } from './common.cjs';
2
2
 
3
3
  /**
4
4
  * FISCAL is SoT for taxes/compliance.
5
- * Must reference md_country_code/region codes from master-data.
5
+ * References master-data by md_*_uid.
6
6
  */
7
+ type FisStatus = "ACTIVE" | "INACTIVE" | "DRAFT" | "ARCHIVED" | string;
8
+ type FisDirection = "SALE" | "PURCHASE" | string;
9
+ type FisTaxType = "VAT" | "WITHHOLDING" | "EXEMPTION" | "FEE" | "OTHER" | string;
10
+ type FisRoundingMode = "HALF_UP" | "HALF_EVEN" | "DOWN" | "UP" | string;
11
+ type FisRate = {
12
+ rate?: number | null;
13
+ rate_bp?: number | null;
14
+ };
7
15
  type FisTaxRef = RefBase & {
8
16
  uid: UID;
9
17
  code?: Code;
10
18
  name?: string;
11
- rate?: number;
12
- md_country_code?: Code;
13
- md_region_code?: Code;
14
- status?: "ACTIVE" | "INACTIVE" | string;
19
+ type?: FisTaxType;
20
+ } & FisRate & {
21
+ md_country_uid?: UID | null;
22
+ md_region_uid?: UID | null;
23
+ md_commune_uid?: UID | null;
24
+ is_included_in_price?: boolean | null;
25
+ is_compound?: boolean | null;
26
+ status?: FisStatus;
15
27
  };
16
28
  type FisTaxesRefsRequest = BulkUidsRequest;
17
29
  type FisTaxesRefsResponse = BulkRefsResponse<FisTaxRef>;
30
+ type FisTaxRuleTarget = {
31
+ auth_company_uid?: UID | null;
32
+ auth_branch_uid?: UID | null;
33
+ md_country_uid?: UID | null;
34
+ md_region_uid?: UID | null;
35
+ md_commune_uid?: UID | null;
36
+ counterparty_uid?: UID | null;
37
+ res_resource_uid?: UID | null;
38
+ res_category_uid?: UID | null;
39
+ res_variety_uid?: UID | null;
40
+ tags?: Code[] | null;
41
+ };
42
+ type FisTaxRule = {
43
+ uid: UID;
44
+ code?: Code;
45
+ name?: string;
46
+ status?: FisStatus;
47
+ priority?: number;
48
+ direction?: FisDirection;
49
+ fis_tax_uid: UID;
50
+ rounding_mode?: FisRoundingMode;
51
+ min_amount?: number | null;
52
+ max_amount?: number | null;
53
+ target?: FisTaxRuleTarget;
54
+ valid_from?: ISODateTime | null;
55
+ valid_to?: ISODateTime | null;
56
+ };
57
+ type FisTaxLineSnapshot = {
58
+ fis_tax_uid: UID;
59
+ tax_code?: Code | null;
60
+ tax_name?: string | null;
61
+ rate?: number | null;
62
+ rate_bp?: number | null;
63
+ base_amount: number;
64
+ tax_amount: number;
65
+ md_country_uid?: UID | null;
66
+ md_region_uid?: UID | null;
67
+ meta?: Record<string, any> | null;
68
+ };
69
+ type FisDocumentTotalsSnapshot = {
70
+ currency_uid?: UID | null;
71
+ currency_code?: Code | null;
72
+ net_amount?: number | null;
73
+ exempt_amount?: number | null;
74
+ tax_amount?: number | null;
75
+ total_amount: number;
76
+ rounding_amount?: number | null;
77
+ taxes: FisTaxLineSnapshot[];
78
+ };
79
+ type FisTaxCalculationSnapshot = {
80
+ uid: UID;
81
+ status?: FisStatus;
82
+ idempotency_key?: string | null;
83
+ request_id?: string | null;
84
+ auth_company_uid?: UID | null;
85
+ auth_branch_uid?: UID | null;
86
+ auth_employee_uid?: UID | null;
87
+ direction: FisDirection;
88
+ md_country_uid?: UID | null;
89
+ md_region_uid?: UID | null;
90
+ md_commune_uid?: UID | null;
91
+ source_service?: Code | null;
92
+ source_uid?: UID | null;
93
+ totals: FisDocumentTotalsSnapshot;
94
+ created_at?: ISODateTime;
95
+ };
96
+ type FisLineForTaxCalc = {
97
+ line_uid?: UID | null;
98
+ res_variety_uid?: UID | null;
99
+ res_resource_uid?: UID | null;
100
+ res_category_uid?: UID | null;
101
+ description?: string | null;
102
+ quantity?: number | null;
103
+ unit_price?: number | null;
104
+ md_measure_uid?: UID | null;
105
+ md_measure_code?: Code | null;
106
+ discount_amount?: number | null;
107
+ discount_percent?: number | null;
108
+ tags?: Code[] | null;
109
+ meta?: Record<string, any> | null;
110
+ };
111
+ type FisTaxCalculateRequest = {
112
+ idempotency_key: string;
113
+ auth_company_uid?: UID | null;
114
+ auth_branch_uid?: UID | null;
115
+ auth_employee_uid?: UID | null;
116
+ direction: FisDirection;
117
+ md_country_uid: UID;
118
+ md_region_uid?: UID | null;
119
+ md_commune_uid?: UID | null;
120
+ md_currency_uid?: UID | null;
121
+ counterparty_uid?: UID | null;
122
+ source_service?: Code | null;
123
+ source_uid?: UID | null;
124
+ lines: FisLineForTaxCalc[];
125
+ rounding_mode?: FisRoundingMode;
126
+ prices_include_tax?: boolean | null;
127
+ meta?: Record<string, any> | null;
128
+ };
129
+ type FisTaxCalculateResponse = {
130
+ ok: boolean;
131
+ snapshot: FisTaxCalculationSnapshot;
132
+ };
133
+ type FisDocType = "INVOICE" | "RECEIPT" | "CREDIT_NOTE" | "DEBIT_NOTE" | "DISPATCH_GUIDE" | "OTHER" | string;
134
+ type FisDocLifecycleStatus = "DRAFT" | "PENDING_SUBMISSION" | "SUBMITTED" | "ACCEPTED" | "REJECTED" | "CANCELLED" | "VOIDED" | string;
135
+ type FisFiscalDocumentRef = RefBase & {
136
+ uid: UID;
137
+ auth_company_uid?: UID | null;
138
+ auth_branch_uid?: UID | null;
139
+ direction?: FisDirection;
140
+ doc_type?: FisDocType;
141
+ series?: string | null;
142
+ folio?: number | null;
143
+ external_uuid?: string | null;
144
+ md_country_uid?: UID | null;
145
+ status?: FisDocLifecycleStatus;
146
+ issued_at?: ISODateTime | null;
147
+ created_at?: ISODateTime | null;
148
+ };
149
+ type FisIssueRequest = {
150
+ idempotency_key: string;
151
+ auth_company_uid: UID;
152
+ auth_branch_uid?: UID | null;
153
+ auth_employee_uid?: UID | null;
154
+ direction: FisDirection;
155
+ doc_type: FisDocType;
156
+ md_country_uid: UID;
157
+ md_region_uid?: UID | null;
158
+ md_commune_uid?: UID | null;
159
+ source_service?: Code | null;
160
+ source_uid?: UID | null;
161
+ fis_tax_snapshot_uid: UID;
162
+ counterparty_uid?: UID | null;
163
+ attachments?: {
164
+ kind: Code;
165
+ file_uid: UID;
166
+ }[] | null;
167
+ meta?: Record<string, any> | null;
168
+ };
169
+ type FisIssueResponse = {
170
+ ok: boolean;
171
+ document: FisFiscalDocumentRef;
172
+ };
173
+ type FisCancelRequest = {
174
+ idempotency_key: string;
175
+ fis_document_uid: UID;
176
+ reason?: string | null;
177
+ auth_employee_uid?: UID | null;
178
+ meta?: Record<string, any> | null;
179
+ };
180
+ type FisCancelResponse = {
181
+ ok: boolean;
182
+ document: FisFiscalDocumentRef;
183
+ };
184
+ type FisSubmissionStatus = "PENDING" | "SENT" | "ACKED" | "ACCEPTED" | "REJECTED" | "ERROR" | string;
185
+ type FisSubmissionRef = RefBase & {
186
+ uid: UID;
187
+ auth_company_uid?: UID | null;
188
+ md_country_uid?: UID | null;
189
+ status?: FisSubmissionStatus;
190
+ external_tracking_id?: string | null;
191
+ created_at?: ISODateTime | null;
192
+ updated_at?: ISODateTime | null;
193
+ };
194
+ type FisSubmitRequest = {
195
+ idempotency_key: string;
196
+ fis_document_uids: UID[];
197
+ auth_company_uid?: UID | null;
198
+ md_country_uid?: UID | null;
199
+ meta?: Record<string, any> | null;
200
+ };
201
+ type FisSubmitResponse = {
202
+ ok: boolean;
203
+ submission: FisSubmissionRef;
204
+ };
205
+ type FisSubmissionStatusResponse = {
206
+ ok: boolean;
207
+ submission: FisSubmissionRef;
208
+ items?: {
209
+ fis_document_uid: UID;
210
+ status: FisSubmissionStatus;
211
+ message?: string | null;
212
+ external_tracking_id?: string | null;
213
+ }[];
214
+ };
215
+ type FisDocumentsRefsRequest = BulkUidsRequest;
216
+ type FisDocumentsRefsResponse = BulkRefsResponse<FisFiscalDocumentRef>;
217
+ type FisSubmissionsRefsRequest = BulkUidsRequest;
218
+ type FisSubmissionsRefsResponse = BulkRefsResponse<FisSubmissionRef>;
18
219
 
19
- export type { FisTaxRef, FisTaxesRefsRequest, FisTaxesRefsResponse };
220
+ export type { FisCancelRequest, FisCancelResponse, FisDirection, FisDocLifecycleStatus, FisDocType, FisDocumentTotalsSnapshot, FisDocumentsRefsRequest, FisDocumentsRefsResponse, FisFiscalDocumentRef, FisIssueRequest, FisIssueResponse, FisLineForTaxCalc, FisRate, FisRoundingMode, FisStatus, FisSubmissionRef, FisSubmissionStatus, FisSubmissionStatusResponse, FisSubmissionsRefsRequest, FisSubmissionsRefsResponse, FisSubmitRequest, FisSubmitResponse, FisTaxCalculateRequest, FisTaxCalculateResponse, FisTaxCalculationSnapshot, FisTaxLineSnapshot, FisTaxRef, FisTaxRule, FisTaxRuleTarget, FisTaxType, FisTaxesRefsRequest, FisTaxesRefsResponse };
package/dist/fis.d.ts CHANGED
@@ -1,19 +1,220 @@
1
- import { RefBase, UID, Code, BulkUidsRequest, BulkRefsResponse } from './common.js';
1
+ import { UID, RefBase, ISODateTime, Code, BulkUidsRequest, BulkRefsResponse } from './common.js';
2
2
 
3
3
  /**
4
4
  * FISCAL is SoT for taxes/compliance.
5
- * Must reference md_country_code/region codes from master-data.
5
+ * References master-data by md_*_uid.
6
6
  */
7
+ type FisStatus = "ACTIVE" | "INACTIVE" | "DRAFT" | "ARCHIVED" | string;
8
+ type FisDirection = "SALE" | "PURCHASE" | string;
9
+ type FisTaxType = "VAT" | "WITHHOLDING" | "EXEMPTION" | "FEE" | "OTHER" | string;
10
+ type FisRoundingMode = "HALF_UP" | "HALF_EVEN" | "DOWN" | "UP" | string;
11
+ type FisRate = {
12
+ rate?: number | null;
13
+ rate_bp?: number | null;
14
+ };
7
15
  type FisTaxRef = RefBase & {
8
16
  uid: UID;
9
17
  code?: Code;
10
18
  name?: string;
11
- rate?: number;
12
- md_country_code?: Code;
13
- md_region_code?: Code;
14
- status?: "ACTIVE" | "INACTIVE" | string;
19
+ type?: FisTaxType;
20
+ } & FisRate & {
21
+ md_country_uid?: UID | null;
22
+ md_region_uid?: UID | null;
23
+ md_commune_uid?: UID | null;
24
+ is_included_in_price?: boolean | null;
25
+ is_compound?: boolean | null;
26
+ status?: FisStatus;
15
27
  };
16
28
  type FisTaxesRefsRequest = BulkUidsRequest;
17
29
  type FisTaxesRefsResponse = BulkRefsResponse<FisTaxRef>;
30
+ type FisTaxRuleTarget = {
31
+ auth_company_uid?: UID | null;
32
+ auth_branch_uid?: UID | null;
33
+ md_country_uid?: UID | null;
34
+ md_region_uid?: UID | null;
35
+ md_commune_uid?: UID | null;
36
+ counterparty_uid?: UID | null;
37
+ res_resource_uid?: UID | null;
38
+ res_category_uid?: UID | null;
39
+ res_variety_uid?: UID | null;
40
+ tags?: Code[] | null;
41
+ };
42
+ type FisTaxRule = {
43
+ uid: UID;
44
+ code?: Code;
45
+ name?: string;
46
+ status?: FisStatus;
47
+ priority?: number;
48
+ direction?: FisDirection;
49
+ fis_tax_uid: UID;
50
+ rounding_mode?: FisRoundingMode;
51
+ min_amount?: number | null;
52
+ max_amount?: number | null;
53
+ target?: FisTaxRuleTarget;
54
+ valid_from?: ISODateTime | null;
55
+ valid_to?: ISODateTime | null;
56
+ };
57
+ type FisTaxLineSnapshot = {
58
+ fis_tax_uid: UID;
59
+ tax_code?: Code | null;
60
+ tax_name?: string | null;
61
+ rate?: number | null;
62
+ rate_bp?: number | null;
63
+ base_amount: number;
64
+ tax_amount: number;
65
+ md_country_uid?: UID | null;
66
+ md_region_uid?: UID | null;
67
+ meta?: Record<string, any> | null;
68
+ };
69
+ type FisDocumentTotalsSnapshot = {
70
+ currency_uid?: UID | null;
71
+ currency_code?: Code | null;
72
+ net_amount?: number | null;
73
+ exempt_amount?: number | null;
74
+ tax_amount?: number | null;
75
+ total_amount: number;
76
+ rounding_amount?: number | null;
77
+ taxes: FisTaxLineSnapshot[];
78
+ };
79
+ type FisTaxCalculationSnapshot = {
80
+ uid: UID;
81
+ status?: FisStatus;
82
+ idempotency_key?: string | null;
83
+ request_id?: string | null;
84
+ auth_company_uid?: UID | null;
85
+ auth_branch_uid?: UID | null;
86
+ auth_employee_uid?: UID | null;
87
+ direction: FisDirection;
88
+ md_country_uid?: UID | null;
89
+ md_region_uid?: UID | null;
90
+ md_commune_uid?: UID | null;
91
+ source_service?: Code | null;
92
+ source_uid?: UID | null;
93
+ totals: FisDocumentTotalsSnapshot;
94
+ created_at?: ISODateTime;
95
+ };
96
+ type FisLineForTaxCalc = {
97
+ line_uid?: UID | null;
98
+ res_variety_uid?: UID | null;
99
+ res_resource_uid?: UID | null;
100
+ res_category_uid?: UID | null;
101
+ description?: string | null;
102
+ quantity?: number | null;
103
+ unit_price?: number | null;
104
+ md_measure_uid?: UID | null;
105
+ md_measure_code?: Code | null;
106
+ discount_amount?: number | null;
107
+ discount_percent?: number | null;
108
+ tags?: Code[] | null;
109
+ meta?: Record<string, any> | null;
110
+ };
111
+ type FisTaxCalculateRequest = {
112
+ idempotency_key: string;
113
+ auth_company_uid?: UID | null;
114
+ auth_branch_uid?: UID | null;
115
+ auth_employee_uid?: UID | null;
116
+ direction: FisDirection;
117
+ md_country_uid: UID;
118
+ md_region_uid?: UID | null;
119
+ md_commune_uid?: UID | null;
120
+ md_currency_uid?: UID | null;
121
+ counterparty_uid?: UID | null;
122
+ source_service?: Code | null;
123
+ source_uid?: UID | null;
124
+ lines: FisLineForTaxCalc[];
125
+ rounding_mode?: FisRoundingMode;
126
+ prices_include_tax?: boolean | null;
127
+ meta?: Record<string, any> | null;
128
+ };
129
+ type FisTaxCalculateResponse = {
130
+ ok: boolean;
131
+ snapshot: FisTaxCalculationSnapshot;
132
+ };
133
+ type FisDocType = "INVOICE" | "RECEIPT" | "CREDIT_NOTE" | "DEBIT_NOTE" | "DISPATCH_GUIDE" | "OTHER" | string;
134
+ type FisDocLifecycleStatus = "DRAFT" | "PENDING_SUBMISSION" | "SUBMITTED" | "ACCEPTED" | "REJECTED" | "CANCELLED" | "VOIDED" | string;
135
+ type FisFiscalDocumentRef = RefBase & {
136
+ uid: UID;
137
+ auth_company_uid?: UID | null;
138
+ auth_branch_uid?: UID | null;
139
+ direction?: FisDirection;
140
+ doc_type?: FisDocType;
141
+ series?: string | null;
142
+ folio?: number | null;
143
+ external_uuid?: string | null;
144
+ md_country_uid?: UID | null;
145
+ status?: FisDocLifecycleStatus;
146
+ issued_at?: ISODateTime | null;
147
+ created_at?: ISODateTime | null;
148
+ };
149
+ type FisIssueRequest = {
150
+ idempotency_key: string;
151
+ auth_company_uid: UID;
152
+ auth_branch_uid?: UID | null;
153
+ auth_employee_uid?: UID | null;
154
+ direction: FisDirection;
155
+ doc_type: FisDocType;
156
+ md_country_uid: UID;
157
+ md_region_uid?: UID | null;
158
+ md_commune_uid?: UID | null;
159
+ source_service?: Code | null;
160
+ source_uid?: UID | null;
161
+ fis_tax_snapshot_uid: UID;
162
+ counterparty_uid?: UID | null;
163
+ attachments?: {
164
+ kind: Code;
165
+ file_uid: UID;
166
+ }[] | null;
167
+ meta?: Record<string, any> | null;
168
+ };
169
+ type FisIssueResponse = {
170
+ ok: boolean;
171
+ document: FisFiscalDocumentRef;
172
+ };
173
+ type FisCancelRequest = {
174
+ idempotency_key: string;
175
+ fis_document_uid: UID;
176
+ reason?: string | null;
177
+ auth_employee_uid?: UID | null;
178
+ meta?: Record<string, any> | null;
179
+ };
180
+ type FisCancelResponse = {
181
+ ok: boolean;
182
+ document: FisFiscalDocumentRef;
183
+ };
184
+ type FisSubmissionStatus = "PENDING" | "SENT" | "ACKED" | "ACCEPTED" | "REJECTED" | "ERROR" | string;
185
+ type FisSubmissionRef = RefBase & {
186
+ uid: UID;
187
+ auth_company_uid?: UID | null;
188
+ md_country_uid?: UID | null;
189
+ status?: FisSubmissionStatus;
190
+ external_tracking_id?: string | null;
191
+ created_at?: ISODateTime | null;
192
+ updated_at?: ISODateTime | null;
193
+ };
194
+ type FisSubmitRequest = {
195
+ idempotency_key: string;
196
+ fis_document_uids: UID[];
197
+ auth_company_uid?: UID | null;
198
+ md_country_uid?: UID | null;
199
+ meta?: Record<string, any> | null;
200
+ };
201
+ type FisSubmitResponse = {
202
+ ok: boolean;
203
+ submission: FisSubmissionRef;
204
+ };
205
+ type FisSubmissionStatusResponse = {
206
+ ok: boolean;
207
+ submission: FisSubmissionRef;
208
+ items?: {
209
+ fis_document_uid: UID;
210
+ status: FisSubmissionStatus;
211
+ message?: string | null;
212
+ external_tracking_id?: string | null;
213
+ }[];
214
+ };
215
+ type FisDocumentsRefsRequest = BulkUidsRequest;
216
+ type FisDocumentsRefsResponse = BulkRefsResponse<FisFiscalDocumentRef>;
217
+ type FisSubmissionsRefsRequest = BulkUidsRequest;
218
+ type FisSubmissionsRefsResponse = BulkRefsResponse<FisSubmissionRef>;
18
219
 
19
- export type { FisTaxRef, FisTaxesRefsRequest, FisTaxesRefsResponse };
220
+ export type { FisCancelRequest, FisCancelResponse, FisDirection, FisDocLifecycleStatus, FisDocType, FisDocumentTotalsSnapshot, FisDocumentsRefsRequest, FisDocumentsRefsResponse, FisFiscalDocumentRef, FisIssueRequest, FisIssueResponse, FisLineForTaxCalc, FisRate, FisRoundingMode, FisStatus, FisSubmissionRef, FisSubmissionStatus, FisSubmissionStatusResponse, FisSubmissionsRefsRequest, FisSubmissionsRefsResponse, FisSubmitRequest, FisSubmitResponse, FisTaxCalculateRequest, FisTaxCalculateResponse, FisTaxCalculationSnapshot, FisTaxLineSnapshot, FisTaxRef, FisTaxRule, FisTaxRuleTarget, FisTaxType, FisTaxesRefsRequest, FisTaxesRefsResponse };