types-salon-management 1.0.21 → 1.0.23

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,4 +1,7 @@
1
1
  export * from './service.enums';
2
2
  export type { ServiceCategoryRefDto, ServiceContraindicationRefDto, ServiceDetailDto, ServiceListResult, ServiceLocationRefDto, ServiceLocationTaxDto, ServicePhotoDto, ServiceResourceRefDto, ServiceStaffRefDto, ServiceSummaryDto, ServiceVariantDetailDto, ServiceVariantDurationSegmentDto, ServiceVariantPriceOverrideDto, ServiceVariantSummaryDto, } from './service.dto';
3
+ export type { ResolvedVariantPriceDto, ResolveVariantPriceQuery, SearchServicePickerQuery, ServicePickerDurationSegmentDto, ServicePickerItemDto, ServicePickerResult, } from './service.picker';
3
4
  export type { CreateServiceRequest, ListServicesQuery, ServiceLocationTaxInput, ServicePhotoInput, ServiceVariantDurationSegmentInput, ServiceVariantInput, ServiceVariantPriceOverrideInput, UpdateServiceRequest, } from './service.requests';
5
+ export { ServiceImportBatchStatus, ServiceImportRowImportStatus, ServiceImportRowValidationStatus, } from './service.import';
6
+ export type { ImportPreviewRowsResult, ListImportPreviewRowsQuery, ServiceImportBatchDto, ServiceImportDefinitionField, ServiceImportDefinitions, ServiceImportPreviewResponse, ServiceImportPreviewRowDto, ServiceImportRowPayload, ServiceImportTemplateRequest, } from './service.import';
4
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,YAAY,EACV,qBAAqB,EACrB,6BAA6B,EAC7B,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,gCAAgC,EAChC,8BAA8B,EAC9B,wBAAwB,GACzB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,kCAAkC,EAClC,mBAAmB,EACnB,gCAAgC,EAChC,oBAAoB,GACrB,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,YAAY,EACV,qBAAqB,EACrB,6BAA6B,EAC7B,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,gCAAgC,EAChC,8BAA8B,EAC9B,wBAAwB,GACzB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,+BAA+B,EAC/B,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,kCAAkC,EAClC,mBAAmB,EACnB,gCAAgC,EAChC,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,4BAA4B,EAC5B,wBAAwB,EACxB,4BAA4B,EAC5B,0BAA0B,EAC1B,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,kBAAkB,CAAC"}
@@ -14,5 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.ServiceImportRowValidationStatus = exports.ServiceImportRowImportStatus = exports.ServiceImportBatchStatus = void 0;
17
18
  __exportStar(require("./service.enums"), exports);
19
+ var service_import_1 = require("./service.import");
20
+ Object.defineProperty(exports, "ServiceImportBatchStatus", { enumerable: true, get: function () { return service_import_1.ServiceImportBatchStatus; } });
21
+ Object.defineProperty(exports, "ServiceImportRowImportStatus", { enumerable: true, get: function () { return service_import_1.ServiceImportRowImportStatus; } });
22
+ Object.defineProperty(exports, "ServiceImportRowValidationStatus", { enumerable: true, get: function () { return service_import_1.ServiceImportRowValidationStatus; } });
18
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAAgC;AAmChC,mDAI0B;AAHxB,0HAAA,wBAAwB,OAAA;AACxB,8HAAA,4BAA4B,OAAA;AAC5B,kIAAA,gCAAgC,OAAA"}
@@ -0,0 +1,79 @@
1
+ import type { PaginatedResult } from '../pagination';
2
+ export declare const ServiceImportBatchStatus: {
3
+ readonly Pending: "pending";
4
+ readonly Processing: "processing";
5
+ readonly Completed: "completed";
6
+ readonly Failed: "failed";
7
+ };
8
+ export type ServiceImportBatchStatus = (typeof ServiceImportBatchStatus)[keyof typeof ServiceImportBatchStatus];
9
+ export declare const ServiceImportRowValidationStatus: {
10
+ readonly Valid: "valid";
11
+ readonly Invalid: "invalid";
12
+ };
13
+ export type ServiceImportRowValidationStatus = (typeof ServiceImportRowValidationStatus)[keyof typeof ServiceImportRowValidationStatus];
14
+ export declare const ServiceImportRowImportStatus: {
15
+ readonly Pending: "pending";
16
+ readonly Imported: "imported";
17
+ readonly Skipped: "skipped";
18
+ readonly Failed: "failed";
19
+ };
20
+ export type ServiceImportRowImportStatus = (typeof ServiceImportRowImportStatus)[keyof typeof ServiceImportRowImportStatus];
21
+ /** Parsed row from import spreadsheet (7 template columns). */
22
+ export interface ServiceImportRowPayload {
23
+ Name: string;
24
+ Category: string;
25
+ Duration: string;
26
+ Price: string;
27
+ 'Service For': string;
28
+ 'Online Booking'?: string | boolean;
29
+ Description?: string;
30
+ }
31
+ export interface ServiceImportPreviewRowDto extends ServiceImportRowPayload {
32
+ rowIndex: number;
33
+ issues?: string[];
34
+ }
35
+ export interface ServiceImportPreviewResponse {
36
+ batchId: string;
37
+ importBatchId: string;
38
+ fileName: string;
39
+ validCount: number;
40
+ invalidCount: number;
41
+ totalRows: number;
42
+ }
43
+ export interface ServiceImportBatchDto {
44
+ id: string;
45
+ importBatchId: string;
46
+ fileName: string;
47
+ status: ServiceImportBatchStatus;
48
+ totalRows: number;
49
+ validCount: number;
50
+ invalidCount: number;
51
+ importedCount: number;
52
+ failedCount: number;
53
+ processedCount: number;
54
+ progressPercent: number;
55
+ errorMessage?: string | null;
56
+ createdAt: string;
57
+ updatedAt?: string | null;
58
+ }
59
+ export interface ListImportPreviewRowsQuery {
60
+ kind: 'valid' | 'invalid';
61
+ page?: number;
62
+ pageSize?: number;
63
+ }
64
+ export type ImportPreviewRowsResult = PaginatedResult<ServiceImportPreviewRowDto>;
65
+ export interface ServiceImportDefinitionField {
66
+ required?: boolean;
67
+ type?: 'string' | 'number' | 'date' | 'phoneNumber';
68
+ examples?: Array<string | number>;
69
+ fieldDescription?: string;
70
+ allowedValues?: string[];
71
+ valueMap?: Record<string, string | boolean | number>;
72
+ headers?: string[];
73
+ }
74
+ export type ServiceImportDefinitions = Record<string, ServiceImportDefinitionField>;
75
+ export interface ServiceImportTemplateRequest {
76
+ importDefinitions: ServiceImportDefinitions;
77
+ templateName?: string;
78
+ }
79
+ //# sourceMappingURL=service.import.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.import.d.ts","sourceRoot":"","sources":["../../../src/api/services/service.import.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK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true });
3
+ exports.ServiceImportRowImportStatus = exports.ServiceImportRowValidationStatus = exports.ServiceImportBatchStatus = void 0;
4
+ exports.ServiceImportBatchStatus = {
5
+ Pending: 'pending',
6
+ Processing: 'processing',
7
+ Completed: 'completed',
8
+ Failed: 'failed',
9
+ };
10
+ exports.ServiceImportRowValidationStatus = {
11
+ Valid: 'valid',
12
+ Invalid: 'invalid',
13
+ };
14
+ exports.ServiceImportRowImportStatus = {
15
+ Pending: 'pending',
16
+ Imported: 'imported',
17
+ Skipped: 'skipped',
18
+ Failed: 'failed',
19
+ };
20
+ //# sourceMappingURL=service.import.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.import.js","sourceRoot":"","sources":["../../../src/api/services/service.import.ts"],"names":[],"mappings":";;;AAEa,QAAA,wBAAwB,GAAG;IACtC,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;CACR,CAAC;AAKE,QAAA,gCAAgC,GAAG;IAC9C,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;CACV,CAAC;AAKE,QAAA,4BAA4B,GAAG;IAC1C,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC"}
@@ -0,0 +1,49 @@
1
+ import type { PaginatedResult } from '../pagination';
2
+ import type { ServiceAudience, ServiceDurationSegmentType, ServiceTaxMode, ServiceVariantPriceType } from './service.enums';
3
+ export interface SearchServicePickerQuery {
4
+ search?: string;
5
+ locationId: string;
6
+ categoryId?: string;
7
+ serviceFor?: ServiceAudience;
8
+ active?: boolean;
9
+ page?: number;
10
+ pageSize?: number;
11
+ }
12
+ export interface ServicePickerDurationSegmentDto {
13
+ id: string;
14
+ segmentType: ServiceDurationSegmentType;
15
+ durationMinutes: number;
16
+ sortOrder: number;
17
+ }
18
+ export interface ServicePickerItemDto {
19
+ id: string;
20
+ name: string;
21
+ serviceFor: ServiceAudience;
22
+ category: {
23
+ id: string;
24
+ name: string;
25
+ };
26
+ requiresTwoStaffs: boolean;
27
+ taxMode: ServiceTaxMode;
28
+ locationTaxId: string | null;
29
+ variantId: string;
30
+ variantName: string | null;
31
+ price: string;
32
+ priceType: ServiceVariantPriceType;
33
+ hasAdvancePrice: boolean;
34
+ durationSegments: ServicePickerDurationSegmentDto[];
35
+ qualifiedStaffIds: string[];
36
+ resourceIds: string[];
37
+ displayPrice: string;
38
+ displayPriceType: ServiceVariantPriceType;
39
+ }
40
+ export type ServicePickerResult = PaginatedResult<ServicePickerItemDto>;
41
+ export interface ResolveVariantPriceQuery {
42
+ locationId: string;
43
+ staffId?: string;
44
+ }
45
+ export interface ResolvedVariantPriceDto {
46
+ price: string;
47
+ priceType: ServiceVariantPriceType;
48
+ }
49
+ //# sourceMappingURL=service.picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.picker.d.ts","sourceRoot":"","sources":["../../../src/api/services/service.picker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACd,uBAAuB,EACxB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,+BAA+B;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,0BAA0B,CAAC;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,eAAe,CAAC;IAC5B,QAAQ,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACvC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,OAAO,EAAE,cAAc,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,uBAAuB,CAAC;IACnC,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,+BAA+B,EAAE,CAAC;IACpD,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,uBAAuB,CAAC;CAC3C;AAED,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,oBAAoB,CAAC,CAAC;AAExE,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,uBAAuB,CAAC;CACpC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=service.picker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.picker.js","sourceRoot":"","sources":["../../../src/api/services/service.picker.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "types-salon-management",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "Types for Salon Management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,6 +15,14 @@ export type {
15
15
  ServiceVariantPriceOverrideDto,
16
16
  ServiceVariantSummaryDto,
17
17
  } from './service.dto';
18
+ export type {
19
+ ResolvedVariantPriceDto,
20
+ ResolveVariantPriceQuery,
21
+ SearchServicePickerQuery,
22
+ ServicePickerDurationSegmentDto,
23
+ ServicePickerItemDto,
24
+ ServicePickerResult,
25
+ } from './service.picker';
18
26
  export type {
19
27
  CreateServiceRequest,
20
28
  ListServicesQuery,
@@ -25,3 +33,19 @@ export type {
25
33
  ServiceVariantPriceOverrideInput,
26
34
  UpdateServiceRequest,
27
35
  } from './service.requests';
36
+ export {
37
+ ServiceImportBatchStatus,
38
+ ServiceImportRowImportStatus,
39
+ ServiceImportRowValidationStatus,
40
+ } from './service.import';
41
+ export type {
42
+ ImportPreviewRowsResult,
43
+ ListImportPreviewRowsQuery,
44
+ ServiceImportBatchDto,
45
+ ServiceImportDefinitionField,
46
+ ServiceImportDefinitions,
47
+ ServiceImportPreviewResponse,
48
+ ServiceImportPreviewRowDto,
49
+ ServiceImportRowPayload,
50
+ ServiceImportTemplateRequest,
51
+ } from './service.import';
@@ -0,0 +1,96 @@
1
+ import type { PaginatedResult } from '../pagination';
2
+
3
+ export const ServiceImportBatchStatus = {
4
+ Pending: 'pending',
5
+ Processing: 'processing',
6
+ Completed: 'completed',
7
+ Failed: 'failed',
8
+ } as const;
9
+
10
+ export type ServiceImportBatchStatus =
11
+ (typeof ServiceImportBatchStatus)[keyof typeof ServiceImportBatchStatus];
12
+
13
+ export const ServiceImportRowValidationStatus = {
14
+ Valid: 'valid',
15
+ Invalid: 'invalid',
16
+ } as const;
17
+
18
+ export type ServiceImportRowValidationStatus =
19
+ (typeof ServiceImportRowValidationStatus)[keyof typeof ServiceImportRowValidationStatus];
20
+
21
+ export const ServiceImportRowImportStatus = {
22
+ Pending: 'pending',
23
+ Imported: 'imported',
24
+ Skipped: 'skipped',
25
+ Failed: 'failed',
26
+ } as const;
27
+
28
+ export type ServiceImportRowImportStatus =
29
+ (typeof ServiceImportRowImportStatus)[keyof typeof ServiceImportRowImportStatus];
30
+
31
+ /** Parsed row from import spreadsheet (7 template columns). */
32
+ export interface ServiceImportRowPayload {
33
+ Name: string;
34
+ Category: string;
35
+ Duration: string;
36
+ Price: string;
37
+ 'Service For': string;
38
+ 'Online Booking'?: string | boolean;
39
+ Description?: string;
40
+ }
41
+
42
+ export interface ServiceImportPreviewRowDto extends ServiceImportRowPayload {
43
+ rowIndex: number;
44
+ issues?: string[];
45
+ }
46
+
47
+ export interface ServiceImportPreviewResponse {
48
+ batchId: string;
49
+ importBatchId: string;
50
+ fileName: string;
51
+ validCount: number;
52
+ invalidCount: number;
53
+ totalRows: number;
54
+ }
55
+
56
+ export interface ServiceImportBatchDto {
57
+ id: string;
58
+ importBatchId: string;
59
+ fileName: string;
60
+ status: ServiceImportBatchStatus;
61
+ totalRows: number;
62
+ validCount: number;
63
+ invalidCount: number;
64
+ importedCount: number;
65
+ failedCount: number;
66
+ processedCount: number;
67
+ progressPercent: number;
68
+ errorMessage?: string | null;
69
+ createdAt: string;
70
+ updatedAt?: string | null;
71
+ }
72
+
73
+ export interface ListImportPreviewRowsQuery {
74
+ kind: 'valid' | 'invalid';
75
+ page?: number;
76
+ pageSize?: number;
77
+ }
78
+
79
+ export type ImportPreviewRowsResult = PaginatedResult<ServiceImportPreviewRowDto>;
80
+
81
+ export interface ServiceImportDefinitionField {
82
+ required?: boolean;
83
+ type?: 'string' | 'number' | 'date' | 'phoneNumber';
84
+ examples?: Array<string | number>;
85
+ fieldDescription?: string;
86
+ allowedValues?: string[];
87
+ valueMap?: Record<string, string | boolean | number>;
88
+ headers?: string[];
89
+ }
90
+
91
+ export type ServiceImportDefinitions = Record<string, ServiceImportDefinitionField>;
92
+
93
+ export interface ServiceImportTemplateRequest {
94
+ importDefinitions: ServiceImportDefinitions;
95
+ templateName?: string;
96
+ }
@@ -0,0 +1,56 @@
1
+ import type { PaginatedResult } from '../pagination';
2
+ import type {
3
+ ServiceAudience,
4
+ ServiceDurationSegmentType,
5
+ ServiceTaxMode,
6
+ ServiceVariantPriceType,
7
+ } from './service.enums';
8
+
9
+ export interface SearchServicePickerQuery {
10
+ search?: string;
11
+ locationId: string;
12
+ categoryId?: string;
13
+ serviceFor?: ServiceAudience;
14
+ active?: boolean;
15
+ page?: number;
16
+ pageSize?: number;
17
+ }
18
+
19
+ export interface ServicePickerDurationSegmentDto {
20
+ id: string;
21
+ segmentType: ServiceDurationSegmentType;
22
+ durationMinutes: number;
23
+ sortOrder: number;
24
+ }
25
+
26
+ export interface ServicePickerItemDto {
27
+ id: string;
28
+ name: string;
29
+ serviceFor: ServiceAudience;
30
+ category: { id: string; name: string };
31
+ requiresTwoStaffs: boolean;
32
+ taxMode: ServiceTaxMode;
33
+ locationTaxId: string | null;
34
+ variantId: string;
35
+ variantName: string | null;
36
+ price: string;
37
+ priceType: ServiceVariantPriceType;
38
+ hasAdvancePrice: boolean;
39
+ durationSegments: ServicePickerDurationSegmentDto[];
40
+ qualifiedStaffIds: string[];
41
+ resourceIds: string[];
42
+ displayPrice: string;
43
+ displayPriceType: ServiceVariantPriceType;
44
+ }
45
+
46
+ export type ServicePickerResult = PaginatedResult<ServicePickerItemDto>;
47
+
48
+ export interface ResolveVariantPriceQuery {
49
+ locationId: string;
50
+ staffId?: string;
51
+ }
52
+
53
+ export interface ResolvedVariantPriceDto {
54
+ price: string;
55
+ priceType: ServiceVariantPriceType;
56
+ }