types-salon-management 1.0.23 → 1.0.25
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.dto.d.ts +47 -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 +45 -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 +3 -0
- package/dist/api/clients/index.d.ts.map +1 -0
- package/dist/api/clients/index.js +19 -0
- package/dist/api/clients/index.js.map +1 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/payment-methods/index.d.ts +4 -0
- package/dist/api/payment-methods/index.d.ts.map +1 -0
- package/dist/api/payment-methods/index.js +20 -0
- package/dist/api/payment-methods/index.js.map +1 -0
- package/dist/api/payment-methods/payment-method.dto.d.ts +26 -0
- package/dist/api/payment-methods/payment-method.dto.d.ts.map +1 -0
- package/dist/api/payment-methods/payment-method.dto.js +3 -0
- package/dist/api/payment-methods/payment-method.dto.js.map +1 -0
- package/dist/api/payment-methods/payment-method.enums.d.ts +23 -0
- package/dist/api/payment-methods/payment-method.enums.d.ts.map +1 -0
- package/dist/api/payment-methods/payment-method.enums.js +30 -0
- package/dist/api/payment-methods/payment-method.enums.js.map +1 -0
- package/dist/api/payment-methods/payment-method.requests.d.ts +17 -0
- package/dist/api/payment-methods/payment-method.requests.d.ts.map +1 -0
- package/dist/api/payment-methods/payment-method.requests.js +3 -0
- package/dist/api/payment-methods/payment-method.requests.js.map +1 -0
- package/package.json +1 -1
- package/src/api/clients/client.dto.ts +51 -0
- package/src/api/clients/client.requests.ts +49 -0
- package/src/api/clients/index.ts +2 -0
- package/src/api/index.ts +2 -0
- package/src/api/payment-methods/index.ts +3 -0
- package/src/api/payment-methods/payment-method.dto.ts +31 -0
- package/src/api/payment-methods/payment-method.enums.ts +35 -0
- package/src/api/payment-methods/payment-method.requests.ts +19 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { PhoneNumberModel } from '../../models/phone-number-model';
|
|
2
|
+
import type { AuditActor } from '../audit';
|
|
3
|
+
import type { ContraindicationPickerDto } from '../contraindications/contraindication.dto';
|
|
4
|
+
export interface ClientAddressDto {
|
|
5
|
+
addressLine1: string;
|
|
6
|
+
street: string;
|
|
7
|
+
city: string;
|
|
8
|
+
state: string;
|
|
9
|
+
country: string;
|
|
10
|
+
postalCode: string;
|
|
11
|
+
location: unknown | null;
|
|
12
|
+
}
|
|
13
|
+
export interface ClientMarketingConsentDto {
|
|
14
|
+
sms: boolean;
|
|
15
|
+
whatsApp: boolean;
|
|
16
|
+
email: boolean;
|
|
17
|
+
smsConsentedAt: string | null;
|
|
18
|
+
whatsAppConsentedAt: string | null;
|
|
19
|
+
emailConsentedAt: string | null;
|
|
20
|
+
}
|
|
21
|
+
export interface ClientSummaryDto {
|
|
22
|
+
id: string;
|
|
23
|
+
firstName: string;
|
|
24
|
+
lastName: string | null;
|
|
25
|
+
email: string | null;
|
|
26
|
+
phone: PhoneNumberModel;
|
|
27
|
+
color: string | null;
|
|
28
|
+
active: boolean;
|
|
29
|
+
consumerId: string | null;
|
|
30
|
+
createdAt: string;
|
|
31
|
+
}
|
|
32
|
+
export interface ClientDetailDto extends ClientSummaryDto {
|
|
33
|
+
gender: string | null;
|
|
34
|
+
dob: string | null;
|
|
35
|
+
notes: string | null;
|
|
36
|
+
address: ClientAddressDto | null;
|
|
37
|
+
marketingConsent: ClientMarketingConsentDto;
|
|
38
|
+
contraindications: ContraindicationPickerDto[];
|
|
39
|
+
updatedAt: string | null;
|
|
40
|
+
createdBy: AuditActor | null;
|
|
41
|
+
updatedBy: AuditActor | null;
|
|
42
|
+
deletedBy: AuditActor | null;
|
|
43
|
+
}
|
|
44
|
+
export interface ClientCountDto {
|
|
45
|
+
count: number;
|
|
46
|
+
}
|
|
47
|
+
//# 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;AAE3F,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,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,yBAAyB;IACxC,GAAG,EAAE,OAAO,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C,iBAAiB,EAAE,yBAAyB,EAAE,CAAC;IAC/C,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;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,45 @@
|
|
|
1
|
+
import type { PhoneNumberModel } from '../../models/phone-number-model';
|
|
2
|
+
import type { ClientAddressDto } from './client.dto';
|
|
3
|
+
export type ClientSortBy = 'name' | 'createdAt';
|
|
4
|
+
export type ClientSortDirection = 'asc' | 'desc';
|
|
5
|
+
export interface ListClientsQuery {
|
|
6
|
+
page?: number;
|
|
7
|
+
pageSize?: number;
|
|
8
|
+
search?: string;
|
|
9
|
+
sortBy?: ClientSortBy;
|
|
10
|
+
sortDir?: ClientSortDirection;
|
|
11
|
+
}
|
|
12
|
+
export interface ClientMarketingConsentInput {
|
|
13
|
+
sms?: boolean;
|
|
14
|
+
whatsApp?: boolean;
|
|
15
|
+
email?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface CreateClientRequest {
|
|
18
|
+
firstName: string;
|
|
19
|
+
lastName?: string | null;
|
|
20
|
+
phone: PhoneNumberModel;
|
|
21
|
+
email?: string | null;
|
|
22
|
+
gender?: string | null;
|
|
23
|
+
dob?: string | null;
|
|
24
|
+
notes?: string | null;
|
|
25
|
+
address?: ClientAddressDto | null;
|
|
26
|
+
color?: string | null;
|
|
27
|
+
active?: boolean;
|
|
28
|
+
marketingConsent?: ClientMarketingConsentInput;
|
|
29
|
+
contraindicationIds?: string[];
|
|
30
|
+
}
|
|
31
|
+
export interface UpdateClientRequest {
|
|
32
|
+
firstName?: string;
|
|
33
|
+
lastName?: string | null;
|
|
34
|
+
phone?: PhoneNumberModel;
|
|
35
|
+
email?: string | null;
|
|
36
|
+
gender?: string | null;
|
|
37
|
+
dob?: string | null;
|
|
38
|
+
notes?: string | null;
|
|
39
|
+
address?: ClientAddressDto | null;
|
|
40
|
+
color?: string | null;
|
|
41
|
+
active?: boolean;
|
|
42
|
+
marketingConsent?: ClientMarketingConsentInput;
|
|
43
|
+
contraindicationIds?: string[];
|
|
44
|
+
}
|
|
45
|
+
//# 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;AAEhF,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;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B;AAED,MAAM,WAAW,2BAA2B;IAC1C,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,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;CAChC;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,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;CAChC"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
//# 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"}
|
package/dist/api/index.d.ts
CHANGED
|
@@ -19,4 +19,6 @@ export * from './service-categories/index';
|
|
|
19
19
|
export * from './services/index';
|
|
20
20
|
export * from './user-roles/index';
|
|
21
21
|
export * from './permissions/index';
|
|
22
|
+
export * from './payment-methods/index';
|
|
23
|
+
export * from './clients/index';
|
|
22
24
|
//# sourceMappingURL=index.d.ts.map
|
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"}
|
|
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
|
@@ -35,4 +35,6 @@ __exportStar(require("./service-categories/index"), exports);
|
|
|
35
35
|
__exportStar(require("./services/index"), exports);
|
|
36
36
|
__exportStar(require("./user-roles/index"), exports);
|
|
37
37
|
__exportStar(require("./permissions/index"), exports);
|
|
38
|
+
__exportStar(require("./payment-methods/index"), exports);
|
|
39
|
+
__exportStar(require("./clients/index"), exports);
|
|
38
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"}
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/payment-methods/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./payment-method.enums"), exports);
|
|
18
|
+
__exportStar(require("./payment-method.dto"), exports);
|
|
19
|
+
__exportStar(require("./payment-method.requests"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/payment-methods/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,uDAAqC;AACrC,4DAA0C"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AuditActor } from '../audit';
|
|
2
|
+
import type { PaymentProcessingMethod } from '../../enum/payment-processing-method';
|
|
3
|
+
import type { CustomPaymentMode, PaymentMethodKind, PaymentMethodSource } from './payment-method.enums';
|
|
4
|
+
export interface PaymentMethodDto {
|
|
5
|
+
id: string;
|
|
6
|
+
kind: PaymentMethodKind;
|
|
7
|
+
name: string;
|
|
8
|
+
paymentMode: CustomPaymentMode | null;
|
|
9
|
+
processingMethod: PaymentProcessingMethod;
|
|
10
|
+
paymentProviderId: string | null;
|
|
11
|
+
isCheckoutDefault: boolean;
|
|
12
|
+
active: boolean;
|
|
13
|
+
sortOrder: number;
|
|
14
|
+
source: PaymentMethodSource;
|
|
15
|
+
description: string | null;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string | null;
|
|
18
|
+
createdBy: AuditActor | null;
|
|
19
|
+
updatedBy: AuditActor | null;
|
|
20
|
+
deletedBy: AuditActor | null;
|
|
21
|
+
}
|
|
22
|
+
export interface CustomPaymentModeOptionDto {
|
|
23
|
+
value: CustomPaymentMode;
|
|
24
|
+
label: string;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=payment-method.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-method.dto.d.ts","sourceRoot":"","sources":["../../../src/api/payment-methods/payment-method.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACtC,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,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;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,iBAAiB,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-method.dto.js","sourceRoot":"","sources":["../../../src/api/payment-methods/payment-method.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const PaymentMethodKind: {
|
|
2
|
+
readonly Cash: "cash";
|
|
3
|
+
readonly GiftCard: "gift_card";
|
|
4
|
+
readonly Package: "package";
|
|
5
|
+
readonly Custom: "custom";
|
|
6
|
+
};
|
|
7
|
+
export type PaymentMethodKind = (typeof PaymentMethodKind)[keyof typeof PaymentMethodKind];
|
|
8
|
+
export declare const PaymentMethodSource: {
|
|
9
|
+
readonly System: "system";
|
|
10
|
+
readonly User: "user";
|
|
11
|
+
};
|
|
12
|
+
export type PaymentMethodSource = (typeof PaymentMethodSource)[keyof typeof PaymentMethodSource];
|
|
13
|
+
export declare const CustomPaymentMode: {
|
|
14
|
+
readonly Upi: "upi";
|
|
15
|
+
readonly NetBanking: "net_banking";
|
|
16
|
+
readonly DebitCard: "debit_card";
|
|
17
|
+
readonly CreditCard: "credit_card";
|
|
18
|
+
readonly Card: "card";
|
|
19
|
+
readonly Cheque: "cheque";
|
|
20
|
+
};
|
|
21
|
+
export type CustomPaymentMode = (typeof CustomPaymentMode)[keyof typeof CustomPaymentMode];
|
|
22
|
+
export declare const CustomPaymentModeLabels: Record<CustomPaymentMode, string>;
|
|
23
|
+
//# sourceMappingURL=payment-method.enums.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-method.enums.d.ts","sourceRoot":"","sources":["../../../src/api/payment-methods/payment-method.enums.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;;;CAKpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE3F,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjG,eAAO,MAAM,iBAAiB;;;;;;;CAOpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE3F,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAOrE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomPaymentModeLabels = exports.CustomPaymentMode = exports.PaymentMethodSource = exports.PaymentMethodKind = void 0;
|
|
4
|
+
exports.PaymentMethodKind = {
|
|
5
|
+
Cash: 'cash',
|
|
6
|
+
GiftCard: 'gift_card',
|
|
7
|
+
Package: 'package',
|
|
8
|
+
Custom: 'custom',
|
|
9
|
+
};
|
|
10
|
+
exports.PaymentMethodSource = {
|
|
11
|
+
System: 'system',
|
|
12
|
+
User: 'user',
|
|
13
|
+
};
|
|
14
|
+
exports.CustomPaymentMode = {
|
|
15
|
+
Upi: 'upi',
|
|
16
|
+
NetBanking: 'net_banking',
|
|
17
|
+
DebitCard: 'debit_card',
|
|
18
|
+
CreditCard: 'credit_card',
|
|
19
|
+
Card: 'card',
|
|
20
|
+
Cheque: 'cheque',
|
|
21
|
+
};
|
|
22
|
+
exports.CustomPaymentModeLabels = {
|
|
23
|
+
[exports.CustomPaymentMode.Upi]: 'UPI',
|
|
24
|
+
[exports.CustomPaymentMode.NetBanking]: 'Netbanking',
|
|
25
|
+
[exports.CustomPaymentMode.DebitCard]: 'Debit Card',
|
|
26
|
+
[exports.CustomPaymentMode.CreditCard]: 'Credit Card',
|
|
27
|
+
[exports.CustomPaymentMode.Card]: 'Card',
|
|
28
|
+
[exports.CustomPaymentMode.Cheque]: 'Cheque',
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=payment-method.enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-method.enums.js","sourceRoot":"","sources":["../../../src/api/payment-methods/payment-method.enums.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAC/B,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAIE,QAAA,mBAAmB,GAAG;IACjC,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;CACJ,CAAC;AAIE,QAAA,iBAAiB,GAAG;IAC/B,GAAG,EAAE,KAAK;IACV,UAAU,EAAE,aAAa;IACzB,SAAS,EAAE,YAAY;IACvB,UAAU,EAAE,aAAa;IACzB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;CACR,CAAC;AAIE,QAAA,uBAAuB,GAAsC;IACxE,CAAC,yBAAiB,CAAC,GAAG,CAAC,EAAE,KAAK;IAC9B,CAAC,yBAAiB,CAAC,UAAU,CAAC,EAAE,YAAY;IAC5C,CAAC,yBAAiB,CAAC,SAAS,CAAC,EAAE,YAAY;IAC3C,CAAC,yBAAiB,CAAC,UAAU,CAAC,EAAE,aAAa;IAC7C,CAAC,yBAAiB,CAAC,IAAI,CAAC,EAAE,MAAM;IAChC,CAAC,yBAAiB,CAAC,MAAM,CAAC,EAAE,QAAQ;CACrC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CustomPaymentMode } from './payment-method.enums';
|
|
2
|
+
export interface CreatePaymentMethodRequest {
|
|
3
|
+
name: string;
|
|
4
|
+
paymentMode: CustomPaymentMode;
|
|
5
|
+
description?: string | null;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface UpdatePaymentMethodRequest {
|
|
9
|
+
name?: string;
|
|
10
|
+
paymentMode?: CustomPaymentMode;
|
|
11
|
+
description?: string | null;
|
|
12
|
+
active?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ReorderPaymentMethodsRequest {
|
|
15
|
+
paymentMethodIds: string[];
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=payment-method.requests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-method.requests.d.ts","sourceRoot":"","sources":["../../../src/api/payment-methods/payment-method.requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,iBAAiB,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,4BAA4B;IAC3C,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-method.requests.js","sourceRoot":"","sources":["../../../src/api/payment-methods/payment-method.requests.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { PhoneNumberModel } from '../../models/phone-number-model';
|
|
2
|
+
import type { AuditActor } from '../audit';
|
|
3
|
+
import type { ContraindicationPickerDto } from '../contraindications/contraindication.dto';
|
|
4
|
+
|
|
5
|
+
export interface ClientAddressDto {
|
|
6
|
+
addressLine1: string;
|
|
7
|
+
street: string;
|
|
8
|
+
city: string;
|
|
9
|
+
state: string;
|
|
10
|
+
country: string;
|
|
11
|
+
postalCode: string;
|
|
12
|
+
location: unknown | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ClientMarketingConsentDto {
|
|
16
|
+
sms: boolean;
|
|
17
|
+
whatsApp: boolean;
|
|
18
|
+
email: boolean;
|
|
19
|
+
smsConsentedAt: string | null;
|
|
20
|
+
whatsAppConsentedAt: string | null;
|
|
21
|
+
emailConsentedAt: string | null;
|
|
22
|
+
}
|
|
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
|
+
|
|
36
|
+
export interface ClientDetailDto extends ClientSummaryDto {
|
|
37
|
+
gender: string | null;
|
|
38
|
+
dob: string | null;
|
|
39
|
+
notes: string | null;
|
|
40
|
+
address: ClientAddressDto | null;
|
|
41
|
+
marketingConsent: ClientMarketingConsentDto;
|
|
42
|
+
contraindications: ContraindicationPickerDto[];
|
|
43
|
+
updatedAt: string | null;
|
|
44
|
+
createdBy: AuditActor | null;
|
|
45
|
+
updatedBy: AuditActor | null;
|
|
46
|
+
deletedBy: AuditActor | null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface ClientCountDto {
|
|
50
|
+
count: number;
|
|
51
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { PhoneNumberModel } from '../../models/phone-number-model';
|
|
2
|
+
import type { ClientAddressDto, ClientMarketingConsentDto } from './client.dto';
|
|
3
|
+
|
|
4
|
+
export type ClientSortBy = 'name' | 'createdAt';
|
|
5
|
+
export type ClientSortDirection = 'asc' | 'desc';
|
|
6
|
+
|
|
7
|
+
export interface ListClientsQuery {
|
|
8
|
+
page?: number;
|
|
9
|
+
pageSize?: number;
|
|
10
|
+
search?: string;
|
|
11
|
+
sortBy?: ClientSortBy;
|
|
12
|
+
sortDir?: ClientSortDirection;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ClientMarketingConsentInput {
|
|
16
|
+
sms?: boolean;
|
|
17
|
+
whatsApp?: boolean;
|
|
18
|
+
email?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface CreateClientRequest {
|
|
22
|
+
firstName: string;
|
|
23
|
+
lastName?: string | null;
|
|
24
|
+
phone: PhoneNumberModel;
|
|
25
|
+
email?: string | null;
|
|
26
|
+
gender?: string | null;
|
|
27
|
+
dob?: string | null;
|
|
28
|
+
notes?: string | null;
|
|
29
|
+
address?: ClientAddressDto | null;
|
|
30
|
+
color?: string | null;
|
|
31
|
+
active?: boolean;
|
|
32
|
+
marketingConsent?: ClientMarketingConsentInput;
|
|
33
|
+
contraindicationIds?: string[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface UpdateClientRequest {
|
|
37
|
+
firstName?: string;
|
|
38
|
+
lastName?: string | null;
|
|
39
|
+
phone?: PhoneNumberModel;
|
|
40
|
+
email?: string | null;
|
|
41
|
+
gender?: string | null;
|
|
42
|
+
dob?: string | null;
|
|
43
|
+
notes?: string | null;
|
|
44
|
+
address?: ClientAddressDto | null;
|
|
45
|
+
color?: string | null;
|
|
46
|
+
active?: boolean;
|
|
47
|
+
marketingConsent?: ClientMarketingConsentInput;
|
|
48
|
+
contraindicationIds?: string[];
|
|
49
|
+
}
|
package/src/api/index.ts
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { AuditActor } from '../audit';
|
|
2
|
+
import type { PaymentProcessingMethod } from '../../enum/payment-processing-method';
|
|
3
|
+
import type {
|
|
4
|
+
CustomPaymentMode,
|
|
5
|
+
PaymentMethodKind,
|
|
6
|
+
PaymentMethodSource,
|
|
7
|
+
} from './payment-method.enums';
|
|
8
|
+
|
|
9
|
+
export interface PaymentMethodDto {
|
|
10
|
+
id: string;
|
|
11
|
+
kind: PaymentMethodKind;
|
|
12
|
+
name: string;
|
|
13
|
+
paymentMode: CustomPaymentMode | null;
|
|
14
|
+
processingMethod: PaymentProcessingMethod;
|
|
15
|
+
paymentProviderId: string | null;
|
|
16
|
+
isCheckoutDefault: boolean;
|
|
17
|
+
active: boolean;
|
|
18
|
+
sortOrder: number;
|
|
19
|
+
source: PaymentMethodSource;
|
|
20
|
+
description: string | null;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedAt: string | null;
|
|
23
|
+
createdBy: AuditActor | null;
|
|
24
|
+
updatedBy: AuditActor | null;
|
|
25
|
+
deletedBy: AuditActor | null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface CustomPaymentModeOptionDto {
|
|
29
|
+
value: CustomPaymentMode;
|
|
30
|
+
label: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export const PaymentMethodKind = {
|
|
2
|
+
Cash: 'cash',
|
|
3
|
+
GiftCard: 'gift_card',
|
|
4
|
+
Package: 'package',
|
|
5
|
+
Custom: 'custom',
|
|
6
|
+
} as const;
|
|
7
|
+
|
|
8
|
+
export type PaymentMethodKind = (typeof PaymentMethodKind)[keyof typeof PaymentMethodKind];
|
|
9
|
+
|
|
10
|
+
export const PaymentMethodSource = {
|
|
11
|
+
System: 'system',
|
|
12
|
+
User: 'user',
|
|
13
|
+
} as const;
|
|
14
|
+
|
|
15
|
+
export type PaymentMethodSource = (typeof PaymentMethodSource)[keyof typeof PaymentMethodSource];
|
|
16
|
+
|
|
17
|
+
export const CustomPaymentMode = {
|
|
18
|
+
Upi: 'upi',
|
|
19
|
+
NetBanking: 'net_banking',
|
|
20
|
+
DebitCard: 'debit_card',
|
|
21
|
+
CreditCard: 'credit_card',
|
|
22
|
+
Card: 'card',
|
|
23
|
+
Cheque: 'cheque',
|
|
24
|
+
} as const;
|
|
25
|
+
|
|
26
|
+
export type CustomPaymentMode = (typeof CustomPaymentMode)[keyof typeof CustomPaymentMode];
|
|
27
|
+
|
|
28
|
+
export const CustomPaymentModeLabels: Record<CustomPaymentMode, string> = {
|
|
29
|
+
[CustomPaymentMode.Upi]: 'UPI',
|
|
30
|
+
[CustomPaymentMode.NetBanking]: 'Netbanking',
|
|
31
|
+
[CustomPaymentMode.DebitCard]: 'Debit Card',
|
|
32
|
+
[CustomPaymentMode.CreditCard]: 'Credit Card',
|
|
33
|
+
[CustomPaymentMode.Card]: 'Card',
|
|
34
|
+
[CustomPaymentMode.Cheque]: 'Cheque',
|
|
35
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CustomPaymentMode } from './payment-method.enums';
|
|
2
|
+
|
|
3
|
+
export interface CreatePaymentMethodRequest {
|
|
4
|
+
name: string;
|
|
5
|
+
paymentMode: CustomPaymentMode;
|
|
6
|
+
description?: string | null;
|
|
7
|
+
active?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface UpdatePaymentMethodRequest {
|
|
11
|
+
name?: string;
|
|
12
|
+
paymentMode?: CustomPaymentMode;
|
|
13
|
+
description?: string | null;
|
|
14
|
+
active?: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ReorderPaymentMethodsRequest {
|
|
18
|
+
paymentMethodIds: string[];
|
|
19
|
+
}
|