types-salon-management 1.0.24 → 1.0.26
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/api/clients/client-preferred-staff.dto.d.ts +7 -0
- package/dist/api/clients/client-preferred-staff.dto.d.ts.map +1 -0
- package/dist/api/clients/client-preferred-staff.dto.js +3 -0
- package/dist/api/clients/client-preferred-staff.dto.js.map +1 -0
- package/dist/api/clients/client-preferred-staff.requests.d.ts +4 -0
- package/dist/api/clients/client-preferred-staff.requests.d.ts.map +1 -0
- package/dist/api/clients/client-preferred-staff.requests.js +3 -0
- package/dist/api/clients/client-preferred-staff.requests.js.map +1 -0
- package/dist/api/clients/client.constants.d.ts +15 -0
- package/dist/api/clients/client.constants.d.ts.map +1 -0
- package/dist/api/clients/client.constants.js +16 -0
- package/dist/api/clients/client.constants.js.map +1 -0
- package/dist/api/clients/client.dto.d.ts +55 -0
- package/dist/api/clients/client.dto.d.ts.map +1 -0
- package/dist/api/clients/client.dto.js +3 -0
- package/dist/api/clients/client.dto.js.map +1 -0
- package/dist/api/clients/client.requests.d.ts +57 -0
- package/dist/api/clients/client.requests.d.ts.map +1 -0
- package/dist/api/clients/client.requests.js +3 -0
- package/dist/api/clients/client.requests.js.map +1 -0
- package/dist/api/clients/index.d.ts +6 -0
- package/dist/api/clients/index.d.ts.map +1 -0
- package/dist/api/clients/index.js +22 -0
- package/dist/api/clients/index.js.map +1 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +1 -0
- package/dist/api/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/clients/client-preferred-staff.dto.ts +6 -0
- package/src/api/clients/client-preferred-staff.requests.ts +3 -0
- package/src/api/clients/client.constants.ts +18 -0
- package/src/api/clients/client.dto.ts +59 -0
- package/src/api/clients/client.requests.ts +61 -0
- package/src/api/clients/index.ts +5 -0
- package/src/api/index.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-preferred-staff.dto.d.ts","sourceRoot":"","sources":["../../../src/api/clients/client-preferred-staff.dto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-preferred-staff.dto.js","sourceRoot":"","sources":["../../../src/api/clients/client-preferred-staff.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-preferred-staff.requests.d.ts","sourceRoot":"","sources":["../../../src/api/clients/client-preferred-staff.requests.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-preferred-staff.requests.js","sourceRoot":"","sources":["../../../src/api/clients/client-preferred-staff.requests.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const ClientAcquisitionSource: {
|
|
2
|
+
readonly APP: "app";
|
|
3
|
+
readonly WEBSITE: "website";
|
|
4
|
+
readonly FACEBOOK: "facebook";
|
|
5
|
+
readonly INSTAGRAM: "instagram";
|
|
6
|
+
readonly GOOGLE: "google";
|
|
7
|
+
readonly REFERRAL: "referral";
|
|
8
|
+
readonly WALK_IN: "walk_in";
|
|
9
|
+
readonly OTHER: "other";
|
|
10
|
+
};
|
|
11
|
+
export type ClientAcquisitionSource = (typeof ClientAcquisitionSource)[keyof typeof ClientAcquisitionSource];
|
|
12
|
+
/** Allowed honorific values for client title (nullable text column). */
|
|
13
|
+
export declare const CLIENT_TITLE_ALLOW_LIST: readonly ["Mr", "Miss", "Mrs", "Ms", "Mx"];
|
|
14
|
+
export type ClientTitle = (typeof CLIENT_TITLE_ALLOW_LIST)[number];
|
|
15
|
+
//# sourceMappingURL=client.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.constants.d.ts","sourceRoot":"","sources":["../../../src/api/clients/client.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB;;;;;;;;;CAS1B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAEzE,wEAAwE;AACxE,eAAO,MAAM,uBAAuB,4CAA6C,CAAC;AAElF,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CLIENT_TITLE_ALLOW_LIST = exports.ClientAcquisitionSource = void 0;
|
|
4
|
+
exports.ClientAcquisitionSource = {
|
|
5
|
+
APP: 'app',
|
|
6
|
+
WEBSITE: 'website',
|
|
7
|
+
FACEBOOK: 'facebook',
|
|
8
|
+
INSTAGRAM: 'instagram',
|
|
9
|
+
GOOGLE: 'google',
|
|
10
|
+
REFERRAL: 'referral',
|
|
11
|
+
WALK_IN: 'walk_in',
|
|
12
|
+
OTHER: 'other',
|
|
13
|
+
};
|
|
14
|
+
/** Allowed honorific values for client title (nullable text column). */
|
|
15
|
+
exports.CLIENT_TITLE_ALLOW_LIST = ['Mr', 'Miss', 'Mrs', 'Ms', 'Mx'];
|
|
16
|
+
//# sourceMappingURL=client.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.constants.js","sourceRoot":"","sources":["../../../src/api/clients/client.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG;IACrC,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;CACN,CAAC;AAKX,wEAAwE;AAC3D,QAAA,uBAAuB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { PhoneNumberModel } from '../../models/phone-number-model';
|
|
2
|
+
import type { AuditActor } from '../audit';
|
|
3
|
+
import type { ContraindicationPickerDto } from '../contraindications/contraindication.dto';
|
|
4
|
+
import type { ClientAcquisitionSource, ClientTitle } from './client.constants';
|
|
5
|
+
import type { ClientPreferredStaffDto } from './client-preferred-staff.dto';
|
|
6
|
+
import type { ClientCreationSource } from '../../enum/client-creation-source.enum';
|
|
7
|
+
export interface ClientAddressDto {
|
|
8
|
+
addressLine1: string;
|
|
9
|
+
street: string;
|
|
10
|
+
city: string;
|
|
11
|
+
state: string;
|
|
12
|
+
country: string;
|
|
13
|
+
postalCode: string;
|
|
14
|
+
location: unknown | null;
|
|
15
|
+
}
|
|
16
|
+
export interface ClientMarketingConsentDto {
|
|
17
|
+
sms: boolean;
|
|
18
|
+
whatsApp: boolean;
|
|
19
|
+
email: boolean;
|
|
20
|
+
smsConsentedAt: string | null;
|
|
21
|
+
whatsAppConsentedAt: string | null;
|
|
22
|
+
emailConsentedAt: string | null;
|
|
23
|
+
}
|
|
24
|
+
export interface ClientSummaryDto {
|
|
25
|
+
id: string;
|
|
26
|
+
firstName: string;
|
|
27
|
+
lastName: string | null;
|
|
28
|
+
email: string | null;
|
|
29
|
+
phone: PhoneNumberModel;
|
|
30
|
+
color: string | null;
|
|
31
|
+
active: boolean;
|
|
32
|
+
consumerId: string | null;
|
|
33
|
+
createdAt: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ClientDetailDto extends ClientSummaryDto {
|
|
36
|
+
title: ClientTitle | null;
|
|
37
|
+
gender: string | null;
|
|
38
|
+
dob: string | null;
|
|
39
|
+
anniversaryDate: string | null;
|
|
40
|
+
acquisitionSource: ClientAcquisitionSource | null;
|
|
41
|
+
creationSource: ClientCreationSource;
|
|
42
|
+
notes: string | null;
|
|
43
|
+
address: ClientAddressDto | null;
|
|
44
|
+
marketingConsent: ClientMarketingConsentDto;
|
|
45
|
+
contraindications: ContraindicationPickerDto[];
|
|
46
|
+
preferredStaff: ClientPreferredStaffDto[];
|
|
47
|
+
updatedAt: string | null;
|
|
48
|
+
createdBy: AuditActor | null;
|
|
49
|
+
updatedBy: AuditActor | null;
|
|
50
|
+
deletedBy: AuditActor | null;
|
|
51
|
+
}
|
|
52
|
+
export interface ClientCountDto {
|
|
53
|
+
count: number;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=client.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.dto.d.ts","sourceRoot":"","sources":["../../../src/api/clients/client.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,KAAK,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,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ACzB,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.dto.js","sourceRoot":"","sources":["../../../src/api/clients/client.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { PhoneNumberModel } from '../../models/phone-number-model';
|
|
2
|
+
import type { ClientAddressDto } from './client.dto';
|
|
3
|
+
import type { ClientAcquisitionSource, ClientTitle } from './client.constants';
|
|
4
|
+
import type { ClientCreationSource } from '../../enum/client-creation-source.enum';
|
|
5
|
+
export type ClientSortBy = 'name' | 'createdAt';
|
|
6
|
+
export type ClientSortDirection = 'asc' | 'desc';
|
|
7
|
+
export interface ListClientsQuery {
|
|
8
|
+
page?: number;
|
|
9
|
+
pageSize?: number;
|
|
10
|
+
search?: string;
|
|
11
|
+
sortBy?: ClientSortBy;
|
|
12
|
+
sortDir?: ClientSortDirection;
|
|
13
|
+
}
|
|
14
|
+
export interface ClientMarketingConsentInput {
|
|
15
|
+
sms?: boolean;
|
|
16
|
+
whatsApp?: boolean;
|
|
17
|
+
email?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface CreateClientRequest {
|
|
20
|
+
firstName: string;
|
|
21
|
+
lastName?: string | null;
|
|
22
|
+
phone: PhoneNumberModel;
|
|
23
|
+
email?: string | null;
|
|
24
|
+
title?: ClientTitle | null;
|
|
25
|
+
gender?: string | null;
|
|
26
|
+
dob?: string | null;
|
|
27
|
+
anniversaryDate?: string | null;
|
|
28
|
+
acquisitionSource?: ClientAcquisitionSource | null;
|
|
29
|
+
/** Server allowlists values; defaults to `client_form`. */
|
|
30
|
+
creationSource?: ClientCreationSource;
|
|
31
|
+
notes?: string | null;
|
|
32
|
+
address?: ClientAddressDto | null;
|
|
33
|
+
color?: string | null;
|
|
34
|
+
active?: boolean;
|
|
35
|
+
marketingConsent?: ClientMarketingConsentInput;
|
|
36
|
+
contraindicationIds?: string[];
|
|
37
|
+
preferredStaffIds?: string[];
|
|
38
|
+
}
|
|
39
|
+
export interface UpdateClientRequest {
|
|
40
|
+
firstName?: string;
|
|
41
|
+
lastName?: string | null;
|
|
42
|
+
phone?: PhoneNumberModel;
|
|
43
|
+
email?: string | null;
|
|
44
|
+
title?: ClientTitle | null;
|
|
45
|
+
gender?: string | null;
|
|
46
|
+
dob?: string | null;
|
|
47
|
+
anniversaryDate?: string | null;
|
|
48
|
+
acquisitionSource?: ClientAcquisitionSource | null;
|
|
49
|
+
notes?: string | null;
|
|
50
|
+
address?: ClientAddressDto | null;
|
|
51
|
+
color?: string | null;
|
|
52
|
+
active?: boolean;
|
|
53
|
+
marketingConsent?: ClientMarketingConsentInput;
|
|
54
|
+
contraindicationIds?: string[];
|
|
55
|
+
preferredStaffIds?: string[];
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=client.requests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.requests.d.ts","sourceRoot":"","sources":["../../../src/api/clients/client.requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAA6B,MAAM,cAAc,CAAC;AAChF,OAAO,KAAK,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,WAAW,CAAC;AAChD,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC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,EAAE,gBAAgB,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,iBAAiB,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACnD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gBAAgB,CAAC,EAAE,2BAA2B,CAAC;IAC/C,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.requests.js","sourceRoot":"","sources":["../../../src/api/clients/client.requests.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/clients/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client.dto"), exports);
|
|
18
|
+
__exportStar(require("./client.requests"), exports);
|
|
19
|
+
__exportStar(require("./client.constants"), exports);
|
|
20
|
+
__exportStar(require("./client-preferred-staff.dto"), exports);
|
|
21
|
+
__exportStar(require("./client-preferred-staff.requests"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/clients/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,oDAAkC;AAClC,qDAAmC;AACnC,+DAA6C;AAC7C,oEAAkD"}
|
package/dist/api/index.d.ts
CHANGED
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC"}
|
package/dist/api/index.js
CHANGED
|
@@ -36,4 +36,5 @@ __exportStar(require("./services/index"), exports);
|
|
|
36
36
|
__exportStar(require("./user-roles/index"), exports);
|
|
37
37
|
__exportStar(require("./permissions/index"), exports);
|
|
38
38
|
__exportStar(require("./payment-methods/index"), exports);
|
|
39
|
+
__exportStar(require("./clients/index"), exports);
|
|
39
40
|
//# sourceMappingURL=index.js.map
|
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qEAAqE;AACrE,0CAAwB;AACxB,4CAA0B;AAC1B,iDAA+B;AAC/B,+CAA6B;AAC7B,2CAAyB;AACzB,+CAA6B;AAC7B,8CAA4B;AAC5B,qDAAmC;AACnC,wDAAsC;AACtC,6CAA2B;AAC3B,mDAAiC;AACjC,+CAA6B;AAC7B,2DAAyC;AACzC,gDAA8B;AAC9B,oDAAkC;AAClC,4DAA0C;AAC1C,6DAA2C;AAC3C,mDAAiC;AACjC,qDAAmC;AACnC,sDAAoC;AACpC,0DAAwC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qEAAqE;AACrE,0CAAwB;AACxB,4CAA0B;AAC1B,iDAA+B;AAC/B,+CAA6B;AAC7B,2CAAyB;AACzB,+CAA6B;AAC7B,8CAA4B;AAC5B,qDAAmC;AACnC,wDAAsC;AACtC,6CAA2B;AAC3B,mDAAiC;AACjC,+CAA6B;AAC7B,2DAAyC;AACzC,gDAA8B;AAC9B,oDAAkC;AAClC,4DAA0C;AAC1C,6DAA2C;AAC3C,mDAAiC;AACjC,qDAAmC;AACnC,sDAAoC;AACpC,0DAAwC;AACxC,kDAAgC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const ClientAcquisitionSource = {
|
|
2
|
+
APP: 'app',
|
|
3
|
+
WEBSITE: 'website',
|
|
4
|
+
FACEBOOK: 'facebook',
|
|
5
|
+
INSTAGRAM: 'instagram',
|
|
6
|
+
GOOGLE: 'google',
|
|
7
|
+
REFERRAL: 'referral',
|
|
8
|
+
WALK_IN: 'walk_in',
|
|
9
|
+
OTHER: 'other',
|
|
10
|
+
} as const;
|
|
11
|
+
|
|
12
|
+
export type ClientAcquisitionSource =
|
|
13
|
+
(typeof ClientAcquisitionSource)[keyof typeof ClientAcquisitionSource];
|
|
14
|
+
|
|
15
|
+
/** Allowed honorific values for client title (nullable text column). */
|
|
16
|
+
export const CLIENT_TITLE_ALLOW_LIST = ['Mr', 'Miss', 'Mrs', 'Ms', 'Mx'] as const;
|
|
17
|
+
|
|
18
|
+
export type ClientTitle = (typeof CLIENT_TITLE_ALLOW_LIST)[number];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { PhoneNumberModel } from '../../models/phone-number-model';
|
|
2
|
+
import type { AuditActor } from '../audit';
|
|
3
|
+
import type { ContraindicationPickerDto } from '../contraindications/contraindication.dto';
|
|
4
|
+
import type { ClientAcquisitionSource, ClientTitle } from './client.constants';
|
|
5
|
+
import type { ClientPreferredStaffDto } from './client-preferred-staff.dto';
|
|
6
|
+
import type { ClientCreationSource } from '../../enum/client-creation-source.enum';
|
|
7
|
+
|
|
8
|
+
export interface ClientAddressDto {
|
|
9
|
+
addressLine1: string;
|
|
10
|
+
street: string;
|
|
11
|
+
city: string;
|
|
12
|
+
state: string;
|
|
13
|
+
country: string;
|
|
14
|
+
postalCode: string;
|
|
15
|
+
location: unknown | null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ClientMarketingConsentDto {
|
|
19
|
+
sms: boolean;
|
|
20
|
+
whatsApp: boolean;
|
|
21
|
+
email: boolean;
|
|
22
|
+
smsConsentedAt: string | null;
|
|
23
|
+
whatsAppConsentedAt: string | null;
|
|
24
|
+
emailConsentedAt: string | null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface ClientSummaryDto {
|
|
28
|
+
id: string;
|
|
29
|
+
firstName: string;
|
|
30
|
+
lastName: string | null;
|
|
31
|
+
email: string | null;
|
|
32
|
+
phone: PhoneNumberModel;
|
|
33
|
+
color: string | null;
|
|
34
|
+
active: boolean;
|
|
35
|
+
consumerId: string | null;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ClientDetailDto extends ClientSummaryDto {
|
|
40
|
+
title: ClientTitle | null;
|
|
41
|
+
gender: string | null;
|
|
42
|
+
dob: string | null;
|
|
43
|
+
anniversaryDate: string | null;
|
|
44
|
+
acquisitionSource: ClientAcquisitionSource | null;
|
|
45
|
+
creationSource: ClientCreationSource;
|
|
46
|
+
notes: string | null;
|
|
47
|
+
address: ClientAddressDto | null;
|
|
48
|
+
marketingConsent: ClientMarketingConsentDto;
|
|
49
|
+
contraindications: ContraindicationPickerDto[];
|
|
50
|
+
preferredStaff: ClientPreferredStaffDto[];
|
|
51
|
+
updatedAt: string | null;
|
|
52
|
+
createdBy: AuditActor | null;
|
|
53
|
+
updatedBy: AuditActor | null;
|
|
54
|
+
deletedBy: AuditActor | null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface ClientCountDto {
|
|
58
|
+
count: number;
|
|
59
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { PhoneNumberModel } from '../../models/phone-number-model';
|
|
2
|
+
import type { ClientAddressDto, ClientMarketingConsentDto } from './client.dto';
|
|
3
|
+
import type { ClientAcquisitionSource, ClientTitle } from './client.constants';
|
|
4
|
+
import type { ClientCreationSource } from '../../enum/client-creation-source.enum';
|
|
5
|
+
|
|
6
|
+
export type ClientSortBy = 'name' | 'createdAt';
|
|
7
|
+
export type ClientSortDirection = 'asc' | 'desc';
|
|
8
|
+
|
|
9
|
+
export interface ListClientsQuery {
|
|
10
|
+
page?: number;
|
|
11
|
+
pageSize?: number;
|
|
12
|
+
search?: string;
|
|
13
|
+
sortBy?: ClientSortBy;
|
|
14
|
+
sortDir?: ClientSortDirection;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ClientMarketingConsentInput {
|
|
18
|
+
sms?: boolean;
|
|
19
|
+
whatsApp?: boolean;
|
|
20
|
+
email?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CreateClientRequest {
|
|
24
|
+
firstName: string;
|
|
25
|
+
lastName?: string | null;
|
|
26
|
+
phone: PhoneNumberModel;
|
|
27
|
+
email?: string | null;
|
|
28
|
+
title?: ClientTitle | null;
|
|
29
|
+
gender?: string | null;
|
|
30
|
+
dob?: string | null;
|
|
31
|
+
anniversaryDate?: string | null;
|
|
32
|
+
acquisitionSource?: ClientAcquisitionSource | null;
|
|
33
|
+
/** Server allowlists values; defaults to `client_form`. */
|
|
34
|
+
creationSource?: ClientCreationSource;
|
|
35
|
+
notes?: string | null;
|
|
36
|
+
address?: ClientAddressDto | null;
|
|
37
|
+
color?: string | null;
|
|
38
|
+
active?: boolean;
|
|
39
|
+
marketingConsent?: ClientMarketingConsentInput;
|
|
40
|
+
contraindicationIds?: string[];
|
|
41
|
+
preferredStaffIds?: string[];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface UpdateClientRequest {
|
|
45
|
+
firstName?: string;
|
|
46
|
+
lastName?: string | null;
|
|
47
|
+
phone?: PhoneNumberModel;
|
|
48
|
+
email?: string | null;
|
|
49
|
+
title?: ClientTitle | null;
|
|
50
|
+
gender?: string | null;
|
|
51
|
+
dob?: string | null;
|
|
52
|
+
anniversaryDate?: string | null;
|
|
53
|
+
acquisitionSource?: ClientAcquisitionSource | null;
|
|
54
|
+
notes?: string | null;
|
|
55
|
+
address?: ClientAddressDto | null;
|
|
56
|
+
color?: string | null;
|
|
57
|
+
active?: boolean;
|
|
58
|
+
marketingConsent?: ClientMarketingConsentInput;
|
|
59
|
+
contraindicationIds?: string[];
|
|
60
|
+
preferredStaffIds?: string[];
|
|
61
|
+
}
|
package/src/api/index.ts
CHANGED