types-salon-management 1.0.61 → 1.0.63

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.
@@ -1,10 +1,37 @@
1
1
  /** How an inventory master record came to exist. */
2
- export type InventoryCreationSource = 'form' | 'import';
2
+ export declare const InventoryCreationSource: {
3
+ readonly FORM: "form";
4
+ readonly IMPORT: "import";
5
+ };
6
+ export type InventoryCreationSource = (typeof InventoryCreationSource)[keyof typeof InventoryCreationSource];
3
7
  /** Whether a Product is sold, used internally, or both. */
4
- export type ProductIntent = 'resale' | 'internal' | 'both';
5
- /** Location default product tax, or one custom tax on the Product. */
6
- export type ProductTaxMode = 'default' | 'custom';
8
+ export declare const ProductIntent: {
9
+ readonly RESALE: "resale";
10
+ readonly INTERNAL: "internal";
11
+ readonly BOTH: "both";
12
+ };
13
+ export type ProductIntent = (typeof ProductIntent)[keyof typeof ProductIntent];
14
+ /** Location default product tax, or a per-location snapshot when any location differs. */
15
+ export declare const ProductTaxMode: {
16
+ readonly DEFAULT: "default";
17
+ readonly CUSTOM: "custom";
18
+ };
19
+ export type ProductTaxMode = (typeof ProductTaxMode)[keyof typeof ProductTaxMode];
7
20
  /** Pack-size unit codes stored on the Product. */
8
- export declare const PRODUCT_UNIT_MEASUREMENTS: readonly ["ml", "L", "oz", "mg", "g", "kg", "lb", "cm", "in", "ft", "m", "pcs", "box"];
9
- export type ProductUnitMeasurement = (typeof PRODUCT_UNIT_MEASUREMENTS)[number];
21
+ export declare const ProductUnitMeasurement: {
22
+ readonly ML: "ml";
23
+ readonly L: "L";
24
+ readonly OZ: "oz";
25
+ readonly MG: "mg";
26
+ readonly G: "g";
27
+ readonly KG: "kg";
28
+ readonly LB: "lb";
29
+ readonly CM: "cm";
30
+ readonly IN: "in";
31
+ readonly FT: "ft";
32
+ readonly M: "m";
33
+ readonly PCS: "pcs";
34
+ readonly BOX: "box";
35
+ };
36
+ export type ProductUnitMeasurement = (typeof ProductUnitMeasurement)[keyof typeof ProductUnitMeasurement];
10
37
  //# sourceMappingURL=inventory.constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inventory.constants.d.ts","sourceRoot":"","sources":["../../../src/api/inventory/inventory.constants.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAExD,2DAA2D;AAC3D,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAE3D,sEAAsE;AACtE,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,CAAC;AAElD,kDAAkD;AAClD,eAAO,MAAM,yBAAyB,wFAc5B,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"inventory.constants.d.ts","sourceRoot":"","sources":["../../../src/api/inventory/inventory.constants.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,eAAO,MAAM,uBAAuB;;;CAG1B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAEzE,2DAA2D;AAC3D,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE/E,0FAA0F;AAC1F,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAElF,kDAAkD;AAClD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;CAczB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC"}
@@ -1,20 +1,36 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PRODUCT_UNIT_MEASUREMENTS = void 0;
3
+ exports.ProductUnitMeasurement = exports.ProductTaxMode = exports.ProductIntent = exports.InventoryCreationSource = void 0;
4
+ /** How an inventory master record came to exist. */
5
+ exports.InventoryCreationSource = {
6
+ FORM: 'form',
7
+ IMPORT: 'import',
8
+ };
9
+ /** Whether a Product is sold, used internally, or both. */
10
+ exports.ProductIntent = {
11
+ RESALE: 'resale',
12
+ INTERNAL: 'internal',
13
+ BOTH: 'both',
14
+ };
15
+ /** Location default product tax, or a per-location snapshot when any location differs. */
16
+ exports.ProductTaxMode = {
17
+ DEFAULT: 'default',
18
+ CUSTOM: 'custom',
19
+ };
4
20
  /** Pack-size unit codes stored on the Product. */
5
- exports.PRODUCT_UNIT_MEASUREMENTS = [
6
- 'ml',
7
- 'L',
8
- 'oz',
9
- 'mg',
10
- 'g',
11
- 'kg',
12
- 'lb',
13
- 'cm',
14
- 'in',
15
- 'ft',
16
- 'm',
17
- 'pcs',
18
- 'box',
19
- ];
21
+ exports.ProductUnitMeasurement = {
22
+ ML: 'ml',
23
+ L: 'L',
24
+ OZ: 'oz',
25
+ MG: 'mg',
26
+ G: 'g',
27
+ KG: 'kg',
28
+ LB: 'lb',
29
+ CM: 'cm',
30
+ IN: 'in',
31
+ FT: 'ft',
32
+ M: 'm',
33
+ PCS: 'pcs',
34
+ BOX: 'box',
35
+ };
20
36
  //# sourceMappingURL=inventory.constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inventory.constants.js","sourceRoot":"","sources":["../../../src/api/inventory/inventory.constants.ts"],"names":[],"mappings":";;;AASA,kDAAkD;AACrC,QAAA,yBAAyB,GAAG;IACvC,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,KAAK;IACL,KAAK;CACG,CAAC"}
1
+ {"version":3,"file":"inventory.constants.js","sourceRoot":"","sources":["../../../src/api/inventory/inventory.constants.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACvC,QAAA,uBAAuB,GAAG;IACrC,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;CACR,CAAC;AAKX,2DAA2D;AAC9C,QAAA,aAAa,GAAG;IAC3B,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;CACJ,CAAC;AAIX,0FAA0F;AAC7E,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAIX,kDAAkD;AACrC,QAAA,sBAAsB,GAAG;IACpC,EAAE,EAAE,IAAI;IACR,CAAC,EAAE,GAAG;IACN,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,CAAC,EAAE,GAAG;IACN,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,CAAC,EAAE,GAAG;IACN,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;CACF,CAAC"}
@@ -20,6 +20,11 @@ export interface StockPositionDto {
20
20
  minimumOrderLevel: number;
21
21
  warningStockLevel: number;
22
22
  }
23
+ /** Present only when taxMode is custom — one row per company location. taxId null = no tax. */
24
+ export interface ProductLocationTaxDto {
25
+ locationId: string;
26
+ taxId: string | null;
27
+ }
23
28
  /** Full catalog identity for list and detail — not a slim stub. */
24
29
  export interface ProductSummaryDto {
25
30
  id: string;
@@ -27,7 +32,7 @@ export interface ProductSummaryDto {
27
32
  intent: ProductIntent;
28
33
  active: boolean;
29
34
  taxMode: ProductTaxMode;
30
- taxId: string | null;
35
+ locationTaxes: ProductLocationTaxDto[];
31
36
  retailPrice: string | null;
32
37
  defaultCost: string | null;
33
38
  categoryId: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"product.dto.d.ts","sourceRoot":"","sources":["../../../src/api/inventory/product.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EACV,uBAAuB,EACvB,aAAa,EACb,cAAc,EACd,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,mEAAmE;AACnE,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,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B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,eAAe,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC/C,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,cAAc,EAAE,gBAAgB,EAAE,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,uBAAuB,CAAC;CACzC;AAED,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;CAC9B"}
@@ -23,12 +23,16 @@ export interface StockPositionInput {
23
23
  minimumOrderLevel?: number;
24
24
  warningStockLevel?: number;
25
25
  }
26
+ export interface ProductLocationTaxInput {
27
+ locationId: string;
28
+ taxId?: string | null;
29
+ }
26
30
  export interface CreateProductRequest {
27
31
  name: string;
28
32
  intent?: ProductIntent;
29
33
  active?: boolean;
30
34
  taxMode?: ProductTaxMode;
31
- taxId?: string | null;
35
+ locationTaxes?: ProductLocationTaxInput[];
32
36
  retailPrice?: string | null;
33
37
  defaultCost?: string | null;
34
38
  categoryId?: string | null;
@@ -48,7 +52,7 @@ export interface UpdateProductRequest {
48
52
  intent?: ProductIntent;
49
53
  active?: boolean;
50
54
  taxMode?: ProductTaxMode;
51
- taxId?: string | null;
55
+ locationTaxes?: ProductLocationTaxInput[];
52
56
  retailPrice?: string | null;
53
57
  defaultCost?: string | null;
54
58
  categoryId?: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"product.requests.d.ts","sourceRoot":"","sources":["../../../src/api/inventory/product.requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAEnE,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,KAAK,CAAC,EAAE,MAA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C1C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAChD,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC7B,cAAc,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACvC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "types-salon-management",
3
- "version": "1.0.61",
3
+ "version": "1.0.63",
4
4
  "description": "Types for Salon Management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,27 +1,45 @@
1
1
  /** How an inventory master record came to exist. */
2
- export type InventoryCreationSource = 'form' | 'import';
2
+ export const InventoryCreationSource = {
3
+ FORM: 'form',
4
+ IMPORT: 'import',
5
+ } as const;
6
+
7
+ export type InventoryCreationSource =
8
+ (typeof InventoryCreationSource)[keyof typeof InventoryCreationSource];
3
9
 
4
10
  /** Whether a Product is sold, used internally, or both. */
5
- export type ProductIntent = 'resale' | 'internal' | 'both';
11
+ export const ProductIntent = {
12
+ RESALE: 'resale',
13
+ INTERNAL: 'internal',
14
+ BOTH: 'both',
15
+ } as const;
16
+
17
+ export type ProductIntent = (typeof ProductIntent)[keyof typeof ProductIntent];
18
+
19
+ /** Location default product tax, or a per-location snapshot when any location differs. */
20
+ export const ProductTaxMode = {
21
+ DEFAULT: 'default',
22
+ CUSTOM: 'custom',
23
+ } as const;
6
24
 
7
- /** Location default product tax, or one custom tax on the Product. */
8
- export type ProductTaxMode = 'default' | 'custom';
25
+ export type ProductTaxMode = (typeof ProductTaxMode)[keyof typeof ProductTaxMode];
9
26
 
10
27
  /** Pack-size unit codes stored on the Product. */
11
- export const PRODUCT_UNIT_MEASUREMENTS = [
12
- 'ml',
13
- 'L',
14
- 'oz',
15
- 'mg',
16
- 'g',
17
- 'kg',
18
- 'lb',
19
- 'cm',
20
- 'in',
21
- 'ft',
22
- 'm',
23
- 'pcs',
24
- 'box',
25
- ] as const;
28
+ export const ProductUnitMeasurement = {
29
+ ML: 'ml',
30
+ L: 'L',
31
+ OZ: 'oz',
32
+ MG: 'mg',
33
+ G: 'g',
34
+ KG: 'kg',
35
+ LB: 'lb',
36
+ CM: 'cm',
37
+ IN: 'in',
38
+ FT: 'ft',
39
+ M: 'm',
40
+ PCS: 'pcs',
41
+ BOX: 'box',
42
+ } as const;
26
43
 
27
- export type ProductUnitMeasurement = (typeof PRODUCT_UNIT_MEASUREMENTS)[number];
44
+ export type ProductUnitMeasurement =
45
+ (typeof ProductUnitMeasurement)[keyof typeof ProductUnitMeasurement];
@@ -29,6 +29,12 @@ export interface StockPositionDto {
29
29
  warningStockLevel: number;
30
30
  }
31
31
 
32
+ /** Present only when taxMode is custom — one row per company location. taxId null = no tax. */
33
+ export interface ProductLocationTaxDto {
34
+ locationId: string;
35
+ taxId: string | null;
36
+ }
37
+
32
38
  /** Full catalog identity for list and detail — not a slim stub. */
33
39
  export interface ProductSummaryDto {
34
40
  id: string;
@@ -36,7 +42,7 @@ export interface ProductSummaryDto {
36
42
  intent: ProductIntent;
37
43
  active: boolean;
38
44
  taxMode: ProductTaxMode;
39
- taxId: string | null;
45
+ locationTaxes: ProductLocationTaxDto[];
40
46
  retailPrice: string | null;
41
47
  defaultCost: string | null;
42
48
  categoryId: string | null;
@@ -28,12 +28,17 @@ export interface StockPositionInput {
28
28
  warningStockLevel?: number;
29
29
  }
30
30
 
31
+ export interface ProductLocationTaxInput {
32
+ locationId: string;
33
+ taxId?: string | null;
34
+ }
35
+
31
36
  export interface CreateProductRequest {
32
37
  name: string;
33
38
  intent?: ProductIntent;
34
39
  active?: boolean;
35
40
  taxMode?: ProductTaxMode;
36
- taxId?: string | null;
41
+ locationTaxes?: ProductLocationTaxInput[];
37
42
  retailPrice?: string | null;
38
43
  defaultCost?: string | null;
39
44
  categoryId?: string | null;
@@ -54,7 +59,7 @@ export interface UpdateProductRequest {
54
59
  intent?: ProductIntent;
55
60
  active?: boolean;
56
61
  taxMode?: ProductTaxMode;
57
- taxId?: string | null;
62
+ locationTaxes?: ProductLocationTaxInput[];
58
63
  retailPrice?: string | null;
59
64
  defaultCost?: string | null;
60
65
  categoryId?: string | null;