@final-commerce/common 2.8.1-online.2 → 2.8.1-online.4

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.
@@ -38,18 +38,6 @@ interface VariantInventory {
38
38
  outletId: string;
39
39
  }
40
40
 
41
- interface OrderTax {
42
- name: string;
43
- taxTableId?: string;
44
- taxTableName?: string;
45
- id?: string;
46
- percentage: number;
47
- amount: number;
48
- taxableAmount?: number;
49
- compounding?: boolean;
50
- priority?: number;
51
- }
52
-
53
41
  declare enum CurrencyCode {
54
42
  USD = "USD",
55
43
  EUR = "EUR",
@@ -332,6 +320,26 @@ declare enum ShippingChannel {
332
320
  POS = "pos"
333
321
  }
334
322
 
323
+ declare enum TaxSource {
324
+ MERCHANT = "merchant",
325
+ AUTOMATIC = "automatic"
326
+ }
327
+
328
+ interface OrderTax {
329
+ name: string;
330
+ taxTableId?: string;
331
+ taxTableName?: string;
332
+ id?: string;
333
+ percentage: number;
334
+ amount: number;
335
+ taxableAmount?: number;
336
+ compounding?: boolean;
337
+ priority?: number;
338
+ source?: TaxSource | `${TaxSource}`;
339
+ code?: string;
340
+ place?: string;
341
+ }
342
+
335
343
  interface OrderShippingLine {
336
344
  type: ShippingOptionType | `${ShippingOptionType}`;
337
345
  name?: string;
@@ -525,6 +533,9 @@ interface OrderLineItem {
525
533
  stockQuantity?: number;
526
534
  unitRatioToBase?: number;
527
535
  stockVariantId?: string;
536
+ taxType?: string | null;
537
+ taxCategoryIds?: string[];
538
+ taxTableId?: string;
528
539
  }
529
540
 
530
541
  interface OrderCustomSaleDiscount {
@@ -718,6 +729,7 @@ interface Category extends BaseEntity {
718
729
  parentId?: string;
719
730
  menuOrder?: number;
720
731
  source?: string;
732
+ taxType?: string | null;
721
733
  }
722
734
 
723
735
  interface CompanyExtension extends BaseEntity {
@@ -1001,6 +1013,8 @@ interface Order extends BaseEntity {
1001
1013
  billing?: Address$1;
1002
1014
  shipping?: Address$1;
1003
1015
  shippingLine?: OrderShippingLine;
1016
+ taxPlace?: string;
1017
+ taxTableVersion?: string;
1004
1018
  lineItems: Partial<OrderLineItem>[];
1005
1019
  customSales?: OrderCustomSale[];
1006
1020
  nonRevenueItems?: NonRevenueItem$1[];
@@ -1055,6 +1069,7 @@ interface Product extends BaseEntity {
1055
1069
  maxPrice?: number;
1056
1070
  supplier?: string;
1057
1071
  taxTable?: string | null;
1072
+ taxType?: string | null;
1058
1073
  defaultVariantId?: string;
1059
1074
  categories?: string[];
1060
1075
  outlets?: string[];
@@ -1288,6 +1303,9 @@ interface Tax {
1288
1303
  taxTableId: string;
1289
1304
  compounding?: boolean;
1290
1305
  priority?: number;
1306
+ source?: TaxSource | `${TaxSource}`;
1307
+ code?: string;
1308
+ place?: string;
1291
1309
  }
1292
1310
  interface Tip {
1293
1311
  amount: number;
@@ -1540,6 +1558,9 @@ interface LineItem {
1540
1558
  stockQuantity?: number;
1541
1559
  unitRatioToBase?: number;
1542
1560
  stockVariantId?: string;
1561
+ taxType?: string | null;
1562
+ taxCategoryIds?: string[];
1563
+ taxTableId?: string;
1543
1564
  }
1544
1565
 
1545
1566
  interface TipPayment {
@@ -1785,6 +1806,7 @@ interface FullProduct {
1785
1806
  companyId?: string;
1786
1807
  externalId: string;
1787
1808
  taxTable: string;
1809
+ taxType?: string | null;
1788
1810
  name: string;
1789
1811
  description?: string;
1790
1812
  shortDescription?: string;
@@ -1901,6 +1923,8 @@ interface ActiveProduct {
1901
1923
  price: number;
1902
1924
  images: string[];
1903
1925
  taxTableId: string;
1926
+ taxType?: string | null;
1927
+ taxCategoryIds?: string[];
1904
1928
  quantity: number;
1905
1929
  note?: string;
1906
1930
  discounts?: Discount[];
@@ -38,18 +38,6 @@ interface VariantInventory {
38
38
  outletId: string;
39
39
  }
40
40
 
41
- interface OrderTax {
42
- name: string;
43
- taxTableId?: string;
44
- taxTableName?: string;
45
- id?: string;
46
- percentage: number;
47
- amount: number;
48
- taxableAmount?: number;
49
- compounding?: boolean;
50
- priority?: number;
51
- }
52
-
53
41
  declare enum CurrencyCode {
54
42
  USD = "USD",
55
43
  EUR = "EUR",
@@ -332,6 +320,26 @@ declare enum ShippingChannel {
332
320
  POS = "pos"
333
321
  }
334
322
 
323
+ declare enum TaxSource {
324
+ MERCHANT = "merchant",
325
+ AUTOMATIC = "automatic"
326
+ }
327
+
328
+ interface OrderTax {
329
+ name: string;
330
+ taxTableId?: string;
331
+ taxTableName?: string;
332
+ id?: string;
333
+ percentage: number;
334
+ amount: number;
335
+ taxableAmount?: number;
336
+ compounding?: boolean;
337
+ priority?: number;
338
+ source?: TaxSource | `${TaxSource}`;
339
+ code?: string;
340
+ place?: string;
341
+ }
342
+
335
343
  interface OrderShippingLine {
336
344
  type: ShippingOptionType | `${ShippingOptionType}`;
337
345
  name?: string;
@@ -525,6 +533,9 @@ interface OrderLineItem {
525
533
  stockQuantity?: number;
526
534
  unitRatioToBase?: number;
527
535
  stockVariantId?: string;
536
+ taxType?: string | null;
537
+ taxCategoryIds?: string[];
538
+ taxTableId?: string;
528
539
  }
529
540
 
530
541
  interface OrderCustomSaleDiscount {
@@ -718,6 +729,7 @@ interface Category extends BaseEntity {
718
729
  parentId?: string;
719
730
  menuOrder?: number;
720
731
  source?: string;
732
+ taxType?: string | null;
721
733
  }
722
734
 
723
735
  interface CompanyExtension extends BaseEntity {
@@ -1001,6 +1013,8 @@ interface Order extends BaseEntity {
1001
1013
  billing?: Address$1;
1002
1014
  shipping?: Address$1;
1003
1015
  shippingLine?: OrderShippingLine;
1016
+ taxPlace?: string;
1017
+ taxTableVersion?: string;
1004
1018
  lineItems: Partial<OrderLineItem>[];
1005
1019
  customSales?: OrderCustomSale[];
1006
1020
  nonRevenueItems?: NonRevenueItem$1[];
@@ -1055,6 +1069,7 @@ interface Product extends BaseEntity {
1055
1069
  maxPrice?: number;
1056
1070
  supplier?: string;
1057
1071
  taxTable?: string | null;
1072
+ taxType?: string | null;
1058
1073
  defaultVariantId?: string;
1059
1074
  categories?: string[];
1060
1075
  outlets?: string[];
@@ -1288,6 +1303,9 @@ interface Tax {
1288
1303
  taxTableId: string;
1289
1304
  compounding?: boolean;
1290
1305
  priority?: number;
1306
+ source?: TaxSource | `${TaxSource}`;
1307
+ code?: string;
1308
+ place?: string;
1291
1309
  }
1292
1310
  interface Tip {
1293
1311
  amount: number;
@@ -1540,6 +1558,9 @@ interface LineItem {
1540
1558
  stockQuantity?: number;
1541
1559
  unitRatioToBase?: number;
1542
1560
  stockVariantId?: string;
1561
+ taxType?: string | null;
1562
+ taxCategoryIds?: string[];
1563
+ taxTableId?: string;
1543
1564
  }
1544
1565
 
1545
1566
  interface TipPayment {
@@ -1785,6 +1806,7 @@ interface FullProduct {
1785
1806
  companyId?: string;
1786
1807
  externalId: string;
1787
1808
  taxTable: string;
1809
+ taxType?: string | null;
1788
1810
  name: string;
1789
1811
  description?: string;
1790
1812
  shortDescription?: string;
@@ -1901,6 +1923,8 @@ interface ActiveProduct {
1901
1923
  price: number;
1902
1924
  images: string[];
1903
1925
  taxTableId: string;
1926
+ taxType?: string | null;
1927
+ taxCategoryIds?: string[];
1904
1928
  quantity: number;
1905
1929
  note?: string;
1906
1930
  discounts?: Discount[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@final-commerce/common",
3
- "version": "2.8.1-online.2",
3
+ "version": "2.8.1-online.4",
4
4
  "description": "Shared utilities, types, constants, and engineering governance configs for the Final Commerce platform.",
5
5
  "homepage": "https://github.com/Final-Commerce/common#readme",
6
6
  "bugs": {