@timbro/invoices 0.10.1 → 0.10.3-next.0

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.
@@ -1821,6 +1821,7 @@ export const invoiceApiContract = {
1821
1821
  oneOf: [
1822
1822
  {
1823
1823
  type: "object",
1824
+ title: "AnonymousBuyer",
1824
1825
  required: ["kind"],
1825
1826
  properties: {
1826
1827
  kind: {
@@ -1832,6 +1833,7 @@ export const invoiceApiContract = {
1832
1833
  },
1833
1834
  {
1834
1835
  type: "object",
1836
+ title: "DomesticBuyer",
1835
1837
  required: ["taxId", "legalName", "kind"],
1836
1838
  properties: {
1837
1839
  kind: {
@@ -1855,6 +1857,7 @@ export const invoiceApiContract = {
1855
1857
  },
1856
1858
  {
1857
1859
  type: "object",
1860
+ title: "ForeignBuyer",
1858
1861
  required: ["foreignId", "legalName", "kind"],
1859
1862
  properties: {
1860
1863
  foreignId: {
@@ -1906,6 +1909,7 @@ export const invoiceApiContract = {
1906
1909
  oneOf: [
1907
1910
  {
1908
1911
  type: "object",
1912
+ title: "NotApplicableReadiness",
1909
1913
  required: ["status"],
1910
1914
  properties: {
1911
1915
  status: {
@@ -2329,6 +2333,7 @@ export const invoiceApiContract = {
2329
2333
  },
2330
2334
  {
2331
2335
  type: "object",
2336
+ title: "ZeroRatedTax",
2332
2337
  required: ["kind"],
2333
2338
  properties: {
2334
2339
  kind: {
@@ -2340,6 +2345,7 @@ export const invoiceApiContract = {
2340
2345
  },
2341
2346
  {
2342
2347
  type: "object",
2348
+ title: "ExemptTax",
2343
2349
  required: ["kind"],
2344
2350
  properties: {
2345
2351
  kind: {
@@ -2445,6 +2451,7 @@ export const invoiceApiContract = {
2445
2451
  },
2446
2452
  {
2447
2453
  type: "object",
2454
+ title: "CreditPaymentTerms",
2448
2455
  required: ["dueOn", "type"],
2449
2456
  properties: {
2450
2457
  dueOn: {
@@ -2462,6 +2469,7 @@ export const invoiceApiContract = {
2462
2469
  },
2463
2470
  {
2464
2471
  type: "object",
2472
+ title: "FreePaymentTerms",
2465
2473
  required: ["type"],
2466
2474
  properties: {
2467
2475
  type: {
@@ -5306,6 +5314,7 @@ export const invoiceApiContract = {
5306
5314
  oneOf: [
5307
5315
  {
5308
5316
  type: "object",
5317
+ title: "NotApplicableReadiness",
5309
5318
  required: ["status"],
5310
5319
  properties: {
5311
5320
  status: {
@@ -5509,6 +5518,7 @@ export const invoiceApiContract = {
5509
5518
  oneOf: [
5510
5519
  {
5511
5520
  type: "object",
5521
+ title: "NotApplicableReadiness",
5512
5522
  required: ["status"],
5513
5523
  properties: {
5514
5524
  status: {
@@ -5520,6 +5530,7 @@ export const invoiceApiContract = {
5520
5530
  },
5521
5531
  {
5522
5532
  type: "object",
5533
+ title: "PendingStatus",
5523
5534
  required: ["status"],
5524
5535
  properties: {
5525
5536
  status: {
@@ -9391,6 +9402,7 @@ export const invoiceApiContract = {
9391
9402
  },
9392
9403
  {
9393
9404
  type: "object",
9405
+ title: "CreditPaymentTerms",
9394
9406
  required: ["dueOn", "type"],
9395
9407
  properties: {
9396
9408
  dueOn: {
@@ -9408,6 +9420,7 @@ export const invoiceApiContract = {
9408
9420
  },
9409
9421
  {
9410
9422
  type: "object",
9423
+ title: "FreePaymentTerms",
9411
9424
  required: ["type"],
9412
9425
  properties: {
9413
9426
  type: {
@@ -9448,6 +9461,7 @@ export const invoiceApiContract = {
9448
9461
  oneOf: [
9449
9462
  {
9450
9463
  type: "object",
9464
+ title: "DomesticBuyer",
9451
9465
  required: ["taxId", "legalName", "kind"],
9452
9466
  properties: {
9453
9467
  kind: {
@@ -9471,6 +9485,7 @@ export const invoiceApiContract = {
9471
9485
  },
9472
9486
  {
9473
9487
  type: "object",
9488
+ title: "ForeignBuyer",
9474
9489
  required: ["foreignId", "legalName", "kind"],
9475
9490
  properties: {
9476
9491
  foreignId: {
@@ -9598,6 +9613,7 @@ export const invoiceApiContract = {
9598
9613
  },
9599
9614
  {
9600
9615
  type: "object",
9616
+ title: "ZeroRatedTax",
9601
9617
  required: ["kind"],
9602
9618
  properties: {
9603
9619
  kind: {
@@ -9609,6 +9625,7 @@ export const invoiceApiContract = {
9609
9625
  },
9610
9626
  {
9611
9627
  type: "object",
9628
+ title: "ExemptTax",
9612
9629
  required: ["kind"],
9613
9630
  properties: {
9614
9631
  kind: {
@@ -9818,6 +9835,7 @@ export const invoiceApiContract = {
9818
9835
  oneOf: [
9819
9836
  {
9820
9837
  type: "object",
9838
+ title: "ImmediatePaymentTerms",
9821
9839
  required: ["type"],
9822
9840
  properties: {
9823
9841
  type: {
@@ -9829,6 +9847,7 @@ export const invoiceApiContract = {
9829
9847
  },
9830
9848
  {
9831
9849
  type: "object",
9850
+ title: "FreePaymentTerms",
9832
9851
  required: ["type"],
9833
9852
  properties: {
9834
9853
  type: {
@@ -9936,6 +9955,7 @@ export const invoiceApiContract = {
9936
9955
  oneOf: [
9937
9956
  {
9938
9957
  type: "object",
9958
+ title: "DomesticBuyer",
9939
9959
  required: ["taxId", "legalName", "kind"],
9940
9960
  properties: {
9941
9961
  kind: {
@@ -10127,6 +10147,7 @@ export const invoiceApiContract = {
10127
10147
  oneOf: [
10128
10148
  {
10129
10149
  type: "object",
10150
+ title: "ForeignBuyer",
10130
10151
  required: ["foreignId", "legalName", "kind"],
10131
10152
  properties: {
10132
10153
  foreignId: {
@@ -10268,6 +10289,7 @@ export const invoiceApiContract = {
10268
10289
  oneOf: [
10269
10290
  {
10270
10291
  type: "object",
10292
+ title: "ImmediatePaymentTerms",
10271
10293
  required: ["type"],
10272
10294
  properties: {
10273
10295
  type: {
@@ -10279,6 +10301,7 @@ export const invoiceApiContract = {
10279
10301
  },
10280
10302
  {
10281
10303
  type: "object",
10304
+ title: "CreditPaymentTerms",
10282
10305
  required: ["dueOn", "type"],
10283
10306
  properties: {
10284
10307
  dueOn: {
@@ -10296,6 +10319,7 @@ export const invoiceApiContract = {
10296
10319
  },
10297
10320
  {
10298
10321
  type: "object",
10322
+ title: "FreePaymentTerms",
10299
10323
  required: ["type"],
10300
10324
  properties: {
10301
10325
  type: {
@@ -10502,6 +10526,7 @@ export const invoiceApiContract = {
10502
10526
  "id",
10503
10527
  "environment",
10504
10528
  "issuerTaxId",
10529
+ "issuerLegalName",
10505
10530
  "buyerTaxId",
10506
10531
  "eNcf",
10507
10532
  "state",
@@ -10525,6 +10550,13 @@ export const invoiceApiContract = {
10525
10550
  type: "string",
10526
10551
  format: "uuid",
10527
10552
  },
10553
+ issuerLegalName: {
10554
+ type: ["string", "null"],
10555
+ description: "The issuer's `RazonSocialEmisor` as the delivered e-CF states it, or `null` when the\ndelivery carried no readable name.",
10556
+ maxLength: 150,
10557
+ minLength: 1,
10558
+ pattern: "\\S",
10559
+ },
10528
10560
  issuerTaxId: {
10529
10561
  type: "string",
10530
10562
  },
@@ -10554,6 +10586,7 @@ export const invoiceApiContract = {
10554
10586
  },
10555
10587
  {
10556
10588
  type: "object",
10589
+ title: "PendingStatus",
10557
10590
  description: "Received and awaiting the administrator's review.",
10558
10591
  required: ["status"],
10559
10592
  properties: {
@@ -10636,6 +10669,7 @@ export const invoiceApiContract = {
10636
10669
  "id",
10637
10670
  "environment",
10638
10671
  "issuerTaxId",
10672
+ "issuerLegalName",
10639
10673
  "buyerTaxId",
10640
10674
  "eNcf",
10641
10675
  "state",
@@ -10661,6 +10695,13 @@ export const invoiceApiContract = {
10661
10695
  type: "string",
10662
10696
  format: "uuid",
10663
10697
  },
10698
+ issuerLegalName: {
10699
+ type: ["string", "null"],
10700
+ description: "The issuer's `RazonSocialEmisor` as the delivered e-CF states it, or `null` when the\ndelivery carried no readable name.",
10701
+ maxLength: 150,
10702
+ minLength: 1,
10703
+ pattern: "\\S",
10704
+ },
10664
10705
  issuerTaxId: {
10665
10706
  type: "string",
10666
10707
  },
@@ -10732,6 +10773,7 @@ export const invoiceApiContract = {
10732
10773
  oneOf: [
10733
10774
  {
10734
10775
  type: "object",
10776
+ title: "InvoiceAcceptedEvent",
10735
10777
  required: [
10736
10778
  "data",
10737
10779
  "type",
@@ -10750,6 +10792,7 @@ export const invoiceApiContract = {
10750
10792
  },
10751
10793
  data: {
10752
10794
  type: "object",
10795
+ title: "InvoiceEventData",
10753
10796
  required: ["id", "sourceConnectionId"],
10754
10797
  properties: {
10755
10798
  id: {
@@ -10794,6 +10837,7 @@ export const invoiceApiContract = {
10794
10837
  },
10795
10838
  {
10796
10839
  type: "object",
10840
+ title: "InvoiceRejectedEvent",
10797
10841
  required: [
10798
10842
  "data",
10799
10843
  "type",
@@ -10812,6 +10856,7 @@ export const invoiceApiContract = {
10812
10856
  },
10813
10857
  data: {
10814
10858
  type: "object",
10859
+ title: "InvoiceEventData",
10815
10860
  required: ["id", "sourceConnectionId"],
10816
10861
  properties: {
10817
10862
  id: {
@@ -10856,6 +10901,7 @@ export const invoiceApiContract = {
10856
10901
  },
10857
10902
  {
10858
10903
  type: "object",
10904
+ title: "InvoiceOperatorRequiredEvent",
10859
10905
  required: [
10860
10906
  "data",
10861
10907
  "type",
@@ -10874,6 +10920,7 @@ export const invoiceApiContract = {
10874
10920
  },
10875
10921
  data: {
10876
10922
  type: "object",
10923
+ title: "InvoiceEventData",
10877
10924
  required: ["id", "sourceConnectionId"],
10878
10925
  properties: {
10879
10926
  id: {
@@ -10918,6 +10965,7 @@ export const invoiceApiContract = {
10918
10965
  },
10919
10966
  {
10920
10967
  type: "object",
10968
+ title: "InvoiceReadyEvent",
10921
10969
  required: [
10922
10970
  "data",
10923
10971
  "type",
@@ -10936,6 +10984,7 @@ export const invoiceApiContract = {
10936
10984
  },
10937
10985
  data: {
10938
10986
  type: "object",
10987
+ title: "InvoiceEventData",
10939
10988
  required: ["id", "sourceConnectionId"],
10940
10989
  properties: {
10941
10990
  id: {
@@ -510,6 +510,21 @@ export type FiscalArtifactMediaType = "application/xml" | "application/pdf";
510
510
  * DGII authority protocol selected by the Rust decision core from admitted fiscal facts.
511
511
  */
512
512
  export type FiscalAuthorityRoute = "complete_ecf_reception" | "consumer_summary_reception";
513
+ /**
514
+ * The identified party a fiscal document names opposite its issuer: the buyer of a sale, the
515
+ * supplier of a Type 41 purchase, or the payee of a Type 47 payment abroad.
516
+ *
517
+ * An anonymous consumer and a Type 43 minor expense name no counterparty.
518
+ */
519
+ export type FiscalCounterparty = {
520
+ identity_kind: "domestic";
521
+ legal_name: string;
522
+ tax_id: string;
523
+ } | {
524
+ foreign_identifier: string;
525
+ identity_kind: "foreign";
526
+ legal_name: string;
527
+ };
513
528
  /**
514
529
  * Counterparty class that selects the legal e-CF type set.
515
530
  */
@@ -1110,6 +1125,9 @@ export type InvoiceExpectedTotals = {
1110
1125
  tax: string;
1111
1126
  total: string;
1112
1127
  };
1128
+ /**
1129
+ * ForeignBuyer
1130
+ */
1113
1131
  export type InvoiceExportBuyer = {
1114
1132
  foreignId: string;
1115
1133
  kind: "foreign";
@@ -1856,24 +1874,36 @@ export type InvoiceTotals = {
1856
1874
  };
1857
1875
  export type InvoiceType = "E31" | "E32" | "E33" | "E34" | "E41" | "E43" | "E44" | "E45" | "E46" | "E47";
1858
1876
  export type InvoiceWebhookEvent = {
1877
+ /**
1878
+ * InvoiceEventData
1879
+ */
1859
1880
  data: {
1860
1881
  id: string;
1861
1882
  sourceConnectionId: string;
1862
1883
  };
1863
1884
  type: "invoice.accepted";
1864
1885
  } | {
1886
+ /**
1887
+ * InvoiceEventData
1888
+ */
1865
1889
  data: {
1866
1890
  id: string;
1867
1891
  sourceConnectionId: string;
1868
1892
  };
1869
1893
  type: "invoice.rejected";
1870
1894
  } | {
1895
+ /**
1896
+ * InvoiceEventData
1897
+ */
1871
1898
  data: {
1872
1899
  id: string;
1873
1900
  sourceConnectionId: string;
1874
1901
  };
1875
1902
  type: "invoice.operatorRequired";
1876
1903
  } | {
1904
+ /**
1905
+ * InvoiceEventData
1906
+ */
1877
1907
  data: {
1878
1908
  id: string;
1879
1909
  sourceConnectionId: string;
@@ -1882,6 +1912,9 @@ export type InvoiceWebhookEvent = {
1882
1912
  };
1883
1913
  export type InvoiceWebhookEventEnvelope = {
1884
1914
  apiVersion: string;
1915
+ /**
1916
+ * InvoiceEventData
1917
+ */
1885
1918
  data: {
1886
1919
  id: string;
1887
1920
  sourceConnectionId: string;
@@ -1895,6 +1928,9 @@ export type InvoiceWebhookEventEnvelope = {
1895
1928
  type: "invoice.accepted";
1896
1929
  } | {
1897
1930
  apiVersion: string;
1931
+ /**
1932
+ * InvoiceEventData
1933
+ */
1898
1934
  data: {
1899
1935
  id: string;
1900
1936
  sourceConnectionId: string;
@@ -1908,6 +1944,9 @@ export type InvoiceWebhookEventEnvelope = {
1908
1944
  type: "invoice.rejected";
1909
1945
  } | {
1910
1946
  apiVersion: string;
1947
+ /**
1948
+ * InvoiceEventData
1949
+ */
1911
1950
  data: {
1912
1951
  id: string;
1913
1952
  sourceConnectionId: string;
@@ -1921,6 +1960,9 @@ export type InvoiceWebhookEventEnvelope = {
1921
1960
  type: "invoice.operatorRequired";
1922
1961
  } | {
1923
1962
  apiVersion: string;
1963
+ /**
1964
+ * InvoiceEventData
1965
+ */
1924
1966
  data: {
1925
1967
  id: string;
1926
1968
  sourceConnectionId: string;
@@ -2231,6 +2273,11 @@ export type ReceivedDocumentResource = {
2231
2273
  eNcf: string;
2232
2274
  environment: FiscalEnvironment;
2233
2275
  id: string;
2276
+ /**
2277
+ * The issuer's `RazonSocialEmisor` as the delivered e-CF states it, or `null` when the
2278
+ * delivery carried no readable name.
2279
+ */
2280
+ issuerLegalName: string | null;
2234
2281
  issuerTaxId: string;
2235
2282
  notReceivedReason: null | ReceivedDocumentNotReceivedReasonResource;
2236
2283
  receivedAt: string;
@@ -2246,6 +2293,11 @@ export type ReceivedDocumentSummary = {
2246
2293
  eNcf: string;
2247
2294
  environment: FiscalEnvironment;
2248
2295
  id: string;
2296
+ /**
2297
+ * The issuer's `RazonSocialEmisor` as the delivered e-CF states it, or `null` when the
2298
+ * delivery carried no readable name.
2299
+ */
2300
+ issuerLegalName: string | null;
2249
2301
  issuerTaxId: string;
2250
2302
  receivedAt: string;
2251
2303
  state: ReceivedDocumentStateResource;
@@ -4253,16 +4305,19 @@ export type WorkspaceFiscalOperationPage = {
4253
4305
  };
4254
4306
  export type WorkspaceFiscalOperationResource = {
4255
4307
  commercial_response: null | CommercialResponseProjection;
4308
+ counterparty: null | FiscalCounterparty;
4256
4309
  operation: FiscalOperationResource;
4257
4310
  timeline: WorkspaceFiscalTimelinePage;
4258
4311
  };
4259
4312
  export type WorkspaceFiscalOperationSummary = {
4260
4313
  action: SourceFiscalAction;
4314
+ counterparty: null | FiscalCounterparty;
4261
4315
  created_at: string;
4262
4316
  environment: FiscalEnvironment;
4263
4317
  operation_id: string;
4264
4318
  outcome: FiscalOperationOutcomeResource;
4265
4319
  source: FiscalOperationSource;
4320
+ totals: null | FiscalOperationAmountsResource;
4266
4321
  updated_at: string;
4267
4322
  };
4268
4323
  export type WorkspaceFiscalTimelineEntry = {