@turndown/library 0.1.24 → 0.1.28

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.
Files changed (75) hide show
  1. package/dist/index.cjs +1355 -0
  2. package/dist/index.d.cts +2820 -0
  3. package/dist/index.d.ts +2820 -2
  4. package/dist/index.js +1190 -2
  5. package/package.json +3 -2
  6. package/dist/helpers/date/index.d.ts +0 -113
  7. package/dist/helpers/date/index.js +0 -171
  8. package/dist/helpers/index.d.ts +0 -4
  9. package/dist/helpers/index.js +0 -3
  10. package/dist/helpers/object/index.d.ts +0 -298
  11. package/dist/helpers/object/index.js +0 -540
  12. package/dist/helpers/string/index.d.ts +0 -258
  13. package/dist/helpers/string/index.js +0 -496
  14. package/dist/types/api/index.d.ts +0 -71
  15. package/dist/types/api/index.js +0 -54
  16. package/dist/types/auth/index.d.ts +0 -107
  17. package/dist/types/auth/index.js +0 -8
  18. package/dist/types/auth/routes.d.ts +0 -160
  19. package/dist/types/auth/routes.js +0 -1
  20. package/dist/types/base/index.d.ts +0 -200
  21. package/dist/types/base/index.js +0 -177
  22. package/dist/types/base/paging.types.d.ts +0 -47
  23. package/dist/types/base/paging.types.js +0 -1
  24. package/dist/types/checklist-template/index.d.ts +0 -48
  25. package/dist/types/checklist-template/index.js +0 -1
  26. package/dist/types/checklist-template/routes.d.ts +0 -85
  27. package/dist/types/checklist-template/routes.js +0 -1
  28. package/dist/types/company/index.d.ts +0 -22
  29. package/dist/types/company/index.js +0 -7
  30. package/dist/types/company/routes.d.ts +0 -100
  31. package/dist/types/company/routes.js +0 -1
  32. package/dist/types/damage-report/index.d.ts +0 -148
  33. package/dist/types/damage-report/index.js +0 -29
  34. package/dist/types/damage-report/routes.d.ts +0 -112
  35. package/dist/types/damage-report/routes.js +0 -1
  36. package/dist/types/errors/index.d.ts +0 -66
  37. package/dist/types/errors/index.js +0 -41
  38. package/dist/types/health/index.d.ts +0 -20
  39. package/dist/types/health/index.js +0 -1
  40. package/dist/types/health/routes.d.ts +0 -10
  41. package/dist/types/health/routes.js +0 -1
  42. package/dist/types/image/index.d.ts +0 -35
  43. package/dist/types/image/index.js +0 -12
  44. package/dist/types/image/routes.d.ts +0 -32
  45. package/dist/types/image/routes.js +0 -1
  46. package/dist/types/index.d.ts +0 -22
  47. package/dist/types/index.js +0 -22
  48. package/dist/types/inventory/index.d.ts +0 -124
  49. package/dist/types/inventory/index.js +0 -30
  50. package/dist/types/inventory/routes.d.ts +0 -109
  51. package/dist/types/inventory/routes.js +0 -1
  52. package/dist/types/job/index.d.ts +0 -7
  53. package/dist/types/job/index.js +0 -1
  54. package/dist/types/property/index.d.ts +0 -113
  55. package/dist/types/property/index.js +0 -25
  56. package/dist/types/property/routes.d.ts +0 -54
  57. package/dist/types/property/routes.js +0 -1
  58. package/dist/types/room/index.d.ts +0 -28
  59. package/dist/types/room/index.js +0 -17
  60. package/dist/types/room/routes.d.ts +0 -35
  61. package/dist/types/room/routes.js +0 -1
  62. package/dist/types/room-checklist/index.d.ts +0 -43
  63. package/dist/types/room-checklist/index.js +0 -1
  64. package/dist/types/room-checklist/routes.d.ts +0 -78
  65. package/dist/types/room-checklist/routes.js +0 -1
  66. package/dist/types/subscription/index.d.ts +0 -32
  67. package/dist/types/subscription/index.js +0 -16
  68. package/dist/types/user/index.d.ts +0 -59
  69. package/dist/types/user/index.js +0 -20
  70. package/dist/types/user/routes.d.ts +0 -46
  71. package/dist/types/user/routes.js +0 -1
  72. package/dist/types/work-session/index.d.ts +0 -97
  73. package/dist/types/work-session/index.js +0 -18
  74. package/dist/types/work-session/routes.d.ts +0 -89
  75. package/dist/types/work-session/routes.js +0 -1
@@ -1,107 +0,0 @@
1
- export * from "./routes";
2
- import type { TServiceType } from "../base";
3
- import type { IUserSafe } from "../user";
4
- export declare const AUTH_STATUS: {
5
- readonly Initializing: "Initializing";
6
- readonly Unauthenticated: "Unauthenticated";
7
- readonly Authenticated: "Authenticated";
8
- readonly Refreshing: "Refreshing";
9
- readonly SessionExpired: "SessionExpired";
10
- };
11
- export type TAuthStatus = (typeof AUTH_STATUS)[keyof typeof AUTH_STATUS];
12
- /**
13
- * Token Payload
14
- * JWT token payload structure
15
- */
16
- export interface ITokenPayload {
17
- userId: string;
18
- email: string;
19
- name: string;
20
- }
21
- export interface IRefreshTokenData {
22
- token: string;
23
- tokenHash: string;
24
- tokenFamily: string;
25
- expiresAt: string;
26
- }
27
- export interface IAuthTokenResponse {
28
- user: IUserSafe;
29
- accessToken: string;
30
- refreshToken: string;
31
- expiresAt?: string | null;
32
- companyId?: string;
33
- }
34
- export interface IStoredAuthSession {
35
- accessToken: string | null;
36
- refreshToken: string | null;
37
- expiresAt?: string | null;
38
- }
39
- export interface IAuthTokens {
40
- accessToken: string | null;
41
- /**
42
- * For browser apps, prefer storing the refresh token in an HTTP-only cookie.
43
- * Keep this optional so the same shape can support mobile or non-cookie flows.
44
- */
45
- refreshToken?: string | null;
46
- expiresAt?: string | null;
47
- }
48
- export interface IAuthSession {
49
- authenticatedUser: IUserSafe | null;
50
- accessToken: string | null;
51
- expiresAt?: string | null;
52
- }
53
- export interface ISetAuthSessionParams {
54
- user: IUserSafe | null;
55
- accessToken: string;
56
- refreshToken: string;
57
- expiresAt?: string | null;
58
- }
59
- export interface ILoginCredentials {
60
- email: string;
61
- password: string;
62
- rememberMe: boolean;
63
- }
64
- export interface IRegisterCredentials {
65
- businessType: TServiceType[];
66
- firstName: string;
67
- lastName: string;
68
- email: string;
69
- password: string;
70
- }
71
- /**
72
- * Password Validation Rules
73
- * Rules for password validation
74
- */
75
- export interface IPasswordValidationRules {
76
- minLength: number;
77
- requireUppercase: boolean;
78
- requireLowercase: boolean;
79
- requireNumbers: boolean;
80
- requireSpecialChars: boolean;
81
- }
82
- /**
83
- * Password Validation Result
84
- * Result of password validation
85
- */
86
- export interface IPasswordValidationResult {
87
- valid: boolean;
88
- errors: string[];
89
- }
90
- /**
91
- * Email Validation Result
92
- * Result of email validation
93
- */
94
- export interface IEmailValidationResult {
95
- valid: boolean;
96
- error?: string;
97
- }
98
- /**
99
- * Rate Limit Status
100
- * Information about rate limiting status
101
- */
102
- export interface IRateLimitStatus {
103
- isLimited: boolean;
104
- attempts: number;
105
- maxAttempts: number;
106
- resetTime?: string;
107
- }
@@ -1,8 +0,0 @@
1
- export * from "./routes";
2
- export const AUTH_STATUS = {
3
- Initializing: "Initializing",
4
- Unauthenticated: "Unauthenticated",
5
- Authenticated: "Authenticated",
6
- Refreshing: "Refreshing",
7
- SessionExpired: "SessionExpired",
8
- };
@@ -1,160 +0,0 @@
1
- import type { IAuthTokenResponse } from "..";
2
- import type { TAccountType, IDeviceInfo, IUserSafe } from "../user";
3
- import type { IGetUserResponse } from "../user/routes";
4
- export interface IAuthSessionIdParams {
5
- sessionId: string;
6
- }
7
- export interface IAuthInvitationTokenParams {
8
- token: string;
9
- }
10
- export interface IAuthInvitationIdParams {
11
- invitationId: string;
12
- }
13
- export interface IRegisterRequest {
14
- email: string;
15
- password: string;
16
- firstName: string;
17
- lastName?: string;
18
- accountType: TAccountType;
19
- deviceInfo?: IDeviceInfo;
20
- }
21
- export interface IRegisterResponse extends IAuthTokenResponse {
22
- }
23
- export interface ILoginRequest {
24
- email: string;
25
- password: string;
26
- deviceInfo?: IDeviceInfo;
27
- }
28
- export interface ILoginResponse extends IAuthTokenResponse {
29
- passwordResetRequired?: boolean;
30
- }
31
- export interface IRefreshSessionRequest {
32
- refreshToken: string;
33
- deviceInfo?: IDeviceInfo;
34
- }
35
- export interface IRefreshSessionResponse {
36
- user?: IUserSafe;
37
- accessToken: string;
38
- refreshToken: string;
39
- expiresAt?: string | null;
40
- companyId?: string;
41
- }
42
- export interface ILogoutRequest {
43
- refreshToken?: string;
44
- }
45
- export interface ILogoutResponse {
46
- message: string;
47
- }
48
- export interface ILogoutAllRequest {
49
- userId: string;
50
- }
51
- export interface ILogoutAllResponse {
52
- message: string;
53
- }
54
- export interface IGetMeRequest {
55
- userId: string;
56
- }
57
- export interface IGetMeResponse extends IGetUserResponse {
58
- }
59
- export interface IGetSessionsRequest {
60
- }
61
- export interface IGetSessionsResponse {
62
- id: string;
63
- deviceInfo: string;
64
- createdAt: string;
65
- lastUsedAt: string;
66
- }
67
- export interface IRevokeSessionRequest extends IAuthSessionIdParams {
68
- }
69
- export interface IRevokeSessionResponse {
70
- message: string;
71
- }
72
- export interface IChangePasswordRequest {
73
- currentPassword: string;
74
- newPassword: string;
75
- }
76
- export interface IChangePasswordResponse extends IGetUserResponse {
77
- }
78
- export interface IForgotPasswordRequest {
79
- email: string;
80
- }
81
- export interface IForgotPasswordResponse {
82
- message: string;
83
- }
84
- export interface IGetLoginHistoryRequest {
85
- }
86
- export interface IGetLoginHistoryResponse {
87
- id: string;
88
- email: string;
89
- ipAddress: string;
90
- userAgent: string;
91
- success: boolean;
92
- failureReason?: string;
93
- createdAt: Date;
94
- }
95
- export interface IGetLoginHistoryListResponse {
96
- history: IGetLoginHistoryResponse[];
97
- length: number;
98
- }
99
- export interface IValidateInvitationRequest extends IAuthInvitationTokenParams {
100
- }
101
- export interface IValidateInvitationResponse {
102
- id: string;
103
- companyId: string;
104
- companyName: string;
105
- email: string;
106
- role: TAccountType;
107
- invitedBy: string;
108
- invitedByName: string;
109
- expiresAt: string;
110
- userExists: boolean;
111
- }
112
- export interface IRegisterWithInvitationRequest {
113
- token: string;
114
- password: string;
115
- firstName: string;
116
- lastName?: string;
117
- deviceInfo?: IDeviceInfo;
118
- }
119
- export interface IRegisterWithInvitationResponse extends IAuthTokenResponse {
120
- }
121
- export interface IAcceptInvitationRequest {
122
- userId?: string;
123
- token: string;
124
- }
125
- export interface IAcceptInvitationResponse {
126
- companyId: string;
127
- companyName: string;
128
- role: TAccountType;
129
- }
130
- export interface IAcceptInvitationRouteResponse {
131
- invite: IAcceptInvitationResponse;
132
- message: string;
133
- }
134
- export interface IGetPendingInvitationsRequest {
135
- }
136
- export interface IGetPendingInvitationsResponse {
137
- id: string;
138
- token: string;
139
- companyId: string;
140
- companyName: string;
141
- role: TAccountType;
142
- invitedBy: string;
143
- invitedByName: string;
144
- expiresAt: string;
145
- createdAt: string;
146
- }
147
- export interface IGetPendingInvitationsListResponse {
148
- invitations: IGetPendingInvitationsResponse[];
149
- length: number;
150
- }
151
- export interface IRevokeInvitationRequest extends IAuthInvitationIdParams {
152
- revokedBy?: string;
153
- }
154
- export interface IRevokeInvitationResponse {
155
- message: string;
156
- }
157
- export interface IRefreshRequest extends IRefreshSessionRequest {
158
- }
159
- export interface IRefreshResponse extends IRefreshSessionResponse {
160
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,200 +0,0 @@
1
- export type TJsonPrimitive = string | number | boolean | null;
2
- export type TJsonValue = TJsonPrimitive | TJsonValue[] | {
3
- [key: string]: TJsonValue;
4
- };
5
- export type TUnknownRecord = Record<string, unknown>;
6
- export type TurndownObject<TObject extends object = TUnknownRecord> = {
7
- [TKey in keyof TObject]: TObject[TKey];
8
- };
9
- export type TEmptyObject = Record<string, never>;
10
- export interface IMessageResponse {
11
- message: string;
12
- }
13
- export interface ISuccessResponse {
14
- success: boolean;
15
- }
16
- export interface ICountResponse {
17
- count: number;
18
- }
19
- export interface IEmptyRouteParams {
20
- }
21
- export interface IMetaData {
22
- createdAt: Date;
23
- updatedAt: Date;
24
- deletedAt?: Date;
25
- }
26
- export type TRecordValue<T> = T[keyof T];
27
- export type TRecordKeys<T> = [keyof T];
28
- export interface IVersion {
29
- major: number;
30
- minor: number;
31
- patch: number;
32
- }
33
- export type TVersionInput = string | IVersion;
34
- export interface ISelectOption<TValue extends string = string> {
35
- label: string;
36
- value: TValue;
37
- }
38
- export type TMode = "CREATE" | "EDIT" | "DELETE" | "DETAILS" | null;
39
- export declare const IMAGE_ENTITY: {
40
- readonly USER_PROFILE: "user_profile";
41
- readonly PROPERTY: "property";
42
- readonly PROPERTY_ROOM: "property_room";
43
- readonly MAINTENANCE_TICKET: "maintenance_ticket";
44
- readonly WORK_REPORT: "work_report";
45
- };
46
- export type TImageEntityType = TRecordValue<typeof IMAGE_ENTITY>;
47
- export declare const US_STATES_CODE: {
48
- readonly AL: "AL";
49
- readonly AK: "AK";
50
- readonly AZ: "AZ";
51
- readonly AR: "AR";
52
- readonly CA: "CA";
53
- readonly CO: "CO";
54
- readonly CT: "CT";
55
- readonly DE: "DE";
56
- readonly FL: "FL";
57
- readonly GA: "GA";
58
- readonly HI: "HI";
59
- readonly ID: "ID";
60
- readonly IL: "IL";
61
- readonly IN: "IN";
62
- readonly IA: "IA";
63
- readonly KS: "KS";
64
- readonly KY: "KY";
65
- readonly LA: "LA";
66
- readonly ME: "ME";
67
- readonly MD: "MD";
68
- readonly MA: "MA";
69
- readonly MI: "MI";
70
- readonly MN: "MN";
71
- readonly MS: "MS";
72
- readonly MO: "MO";
73
- readonly MT: "MT";
74
- readonly NE: "NE";
75
- readonly NV: "NV";
76
- readonly NH: "NH";
77
- readonly NJ: "NJ";
78
- readonly NM: "NM";
79
- readonly NY: "NY";
80
- readonly NC: "NC";
81
- readonly ND: "ND";
82
- readonly OH: "OH";
83
- readonly OK: "OK";
84
- readonly OR: "OR";
85
- readonly PA: "PA";
86
- readonly RI: "RI";
87
- readonly SC: "SC";
88
- readonly SD: "SD";
89
- readonly TN: "TN";
90
- readonly TX: "TX";
91
- readonly UT: "UT";
92
- readonly VT: "VT";
93
- readonly VA: "VA";
94
- readonly WA: "WA";
95
- readonly WV: "WV";
96
- readonly WI: "WI";
97
- readonly WY: "WY";
98
- readonly DC: "DC";
99
- readonly PR: "PR";
100
- readonly GU: "GU";
101
- readonly VI: "VI";
102
- readonly AS: "AS";
103
- readonly MP: "MP";
104
- };
105
- export type TUSStateCode = TRecordValue<typeof US_STATES_CODE>;
106
- export declare const US_JURISDICTIONS: {
107
- readonly AL: "Alabama";
108
- readonly AK: "Alaska";
109
- readonly AZ: "Arizona";
110
- readonly AR: "Arkansas";
111
- readonly CA: "California";
112
- readonly CO: "Colorado";
113
- readonly CT: "Connecticut";
114
- readonly DE: "Delaware";
115
- readonly FL: "Florida";
116
- readonly GA: "Georgia";
117
- readonly HI: "Hawaii";
118
- readonly ID: "Idaho";
119
- readonly IL: "Illinois";
120
- readonly IN: "Indiana";
121
- readonly IA: "Iowa";
122
- readonly KS: "Kansas";
123
- readonly KY: "Kentucky";
124
- readonly LA: "Louisiana";
125
- readonly ME: "Maine";
126
- readonly MD: "Maryland";
127
- readonly MA: "Massachusetts";
128
- readonly MI: "Michigan";
129
- readonly MN: "Minnesota";
130
- readonly MS: "Mississippi";
131
- readonly MO: "Missouri";
132
- readonly MT: "Montana";
133
- readonly NE: "Nebraska";
134
- readonly NV: "Nevada";
135
- readonly NH: "New Hampshire";
136
- readonly NJ: "New Jersey";
137
- readonly NM: "New Mexico";
138
- readonly NY: "New York";
139
- readonly NC: "North Carolina";
140
- readonly ND: "North Dakota";
141
- readonly OH: "Ohio";
142
- readonly OK: "Oklahoma";
143
- readonly OR: "Oregon";
144
- readonly PA: "Pennsylvania";
145
- readonly RI: "Rhode Island";
146
- readonly SC: "South Carolina";
147
- readonly SD: "South Dakota";
148
- readonly TN: "Tennessee";
149
- readonly TX: "Texas";
150
- readonly UT: "Utah";
151
- readonly VT: "Vermont";
152
- readonly VA: "Virginia";
153
- readonly WA: "Washington";
154
- readonly WV: "West Virginia";
155
- readonly WI: "Wisconsin";
156
- readonly WY: "Wyoming";
157
- readonly DC: "District of Columbia";
158
- readonly PR: "Puerto Rico";
159
- readonly GU: "Guam";
160
- readonly VI: "United States Virgin Islands";
161
- readonly AS: "American Samoa";
162
- readonly MP: "Northern Mariana Islands";
163
- };
164
- export type TUSJurisdiction = TRecordValue<typeof US_JURISDICTIONS>;
165
- export declare const UnitedStatesJurisdictionOptions: ISelectOption<TUSJurisdiction>[];
166
- export declare const STATUS: {
167
- readonly Pending: "Pending";
168
- readonly InProgress: "InProgress";
169
- readonly Completed: "Completed";
170
- readonly Overdue: "Overdue";
171
- readonly Active: "Active";
172
- readonly Inactive: "Inactive";
173
- };
174
- export type TStatus = TRecordValue<typeof STATUS>;
175
- export declare const StatusOptions: ISelectOption<TStatus>[];
176
- export declare const SEVERITY: {
177
- readonly Low: "Low";
178
- readonly Medium: "Medium";
179
- readonly High: "High";
180
- };
181
- export type TSeverity = TRecordValue<typeof SEVERITY>;
182
- export declare const SeverityOptions: ISelectOption<TSeverity>[];
183
- export declare const SERVICE_TYPES: {
184
- readonly Cleaning: "Cleaning";
185
- readonly Maintenance: "Maintenance";
186
- readonly Inspection: "Inspections";
187
- readonly Other: "Other";
188
- };
189
- export type TServiceType = TRecordValue<typeof SERVICE_TYPES>;
190
- export declare const ServiceTypeOptions: ISelectOption<TServiceType>[];
191
- export declare const MONTHS: readonly ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
192
- export type TMonth = (typeof MONTHS)[number];
193
- export interface IWeekDay {
194
- date: Date;
195
- dayOfMonth: number;
196
- shortLabel: string;
197
- letter: string;
198
- isToday: boolean;
199
- }
200
- export * from "./paging.types";
@@ -1,177 +0,0 @@
1
- export const IMAGE_ENTITY = {
2
- USER_PROFILE: "user_profile",
3
- PROPERTY: "property",
4
- PROPERTY_ROOM: "property_room",
5
- MAINTENANCE_TICKET: "maintenance_ticket",
6
- WORK_REPORT: "work_report",
7
- };
8
- export const US_STATES_CODE = {
9
- // 50 States
10
- AL: "AL",
11
- AK: "AK",
12
- AZ: "AZ",
13
- AR: "AR",
14
- CA: "CA",
15
- CO: "CO",
16
- CT: "CT",
17
- DE: "DE",
18
- FL: "FL",
19
- GA: "GA",
20
- HI: "HI",
21
- ID: "ID",
22
- IL: "IL",
23
- IN: "IN",
24
- IA: "IA",
25
- KS: "KS",
26
- KY: "KY",
27
- LA: "LA",
28
- ME: "ME",
29
- MD: "MD",
30
- MA: "MA",
31
- MI: "MI",
32
- MN: "MN",
33
- MS: "MS",
34
- MO: "MO",
35
- MT: "MT",
36
- NE: "NE",
37
- NV: "NV",
38
- NH: "NH",
39
- NJ: "NJ",
40
- NM: "NM",
41
- NY: "NY",
42
- NC: "NC",
43
- ND: "ND",
44
- OH: "OH",
45
- OK: "OK",
46
- OR: "OR",
47
- PA: "PA",
48
- RI: "RI",
49
- SC: "SC",
50
- SD: "SD",
51
- TN: "TN",
52
- TX: "TX",
53
- UT: "UT",
54
- VT: "VT",
55
- VA: "VA",
56
- WA: "WA",
57
- WV: "WV",
58
- WI: "WI",
59
- WY: "WY",
60
- // Territories
61
- DC: "DC",
62
- PR: "PR",
63
- GU: "GU",
64
- VI: "VI",
65
- AS: "AS",
66
- MP: "MP",
67
- };
68
- export const US_JURISDICTIONS = {
69
- // 50 States
70
- AL: "Alabama",
71
- AK: "Alaska",
72
- AZ: "Arizona",
73
- AR: "Arkansas",
74
- CA: "California",
75
- CO: "Colorado",
76
- CT: "Connecticut",
77
- DE: "Delaware",
78
- FL: "Florida",
79
- GA: "Georgia",
80
- HI: "Hawaii",
81
- ID: "Idaho",
82
- IL: "Illinois",
83
- IN: "Indiana",
84
- IA: "Iowa",
85
- KS: "Kansas",
86
- KY: "Kentucky",
87
- LA: "Louisiana",
88
- ME: "Maine",
89
- MD: "Maryland",
90
- MA: "Massachusetts",
91
- MI: "Michigan",
92
- MN: "Minnesota",
93
- MS: "Mississippi",
94
- MO: "Missouri",
95
- MT: "Montana",
96
- NE: "Nebraska",
97
- NV: "Nevada",
98
- NH: "New Hampshire",
99
- NJ: "New Jersey",
100
- NM: "New Mexico",
101
- NY: "New York",
102
- NC: "North Carolina",
103
- ND: "North Dakota",
104
- OH: "Ohio",
105
- OK: "Oklahoma",
106
- OR: "Oregon",
107
- PA: "Pennsylvania",
108
- RI: "Rhode Island",
109
- SC: "South Carolina",
110
- SD: "South Dakota",
111
- TN: "Tennessee",
112
- TX: "Texas",
113
- UT: "Utah",
114
- VT: "Vermont",
115
- VA: "Virginia",
116
- WA: "Washington",
117
- WV: "West Virginia",
118
- WI: "Wisconsin",
119
- WY: "Wyoming",
120
- // Territories
121
- DC: "District of Columbia",
122
- PR: "Puerto Rico",
123
- GU: "Guam",
124
- VI: "United States Virgin Islands",
125
- AS: "American Samoa",
126
- MP: "Northern Mariana Islands",
127
- };
128
- export const UnitedStatesJurisdictionOptions = Object.values(US_JURISDICTIONS).map((jurisdiction) => ({
129
- label: jurisdiction,
130
- value: jurisdiction,
131
- }));
132
- export const STATUS = {
133
- Pending: "Pending",
134
- InProgress: "InProgress",
135
- Completed: "Completed",
136
- Overdue: "Overdue",
137
- Active: "Active",
138
- Inactive: "Inactive",
139
- };
140
- export const StatusOptions = Object.values(STATUS).map((status) => ({
141
- label: status,
142
- value: status,
143
- }));
144
- export const SEVERITY = {
145
- Low: "Low",
146
- Medium: "Medium",
147
- High: "High",
148
- };
149
- export const SeverityOptions = Object.values(SEVERITY).map((severity) => ({
150
- label: severity,
151
- value: severity,
152
- }));
153
- export const SERVICE_TYPES = {
154
- Cleaning: "Cleaning",
155
- Maintenance: "Maintenance",
156
- Inspection: "Inspections",
157
- Other: "Other",
158
- };
159
- export const ServiceTypeOptions = Object.values(SERVICE_TYPES).map((serviceType) => ({
160
- label: serviceType,
161
- value: serviceType,
162
- }));
163
- export const MONTHS = [
164
- "January",
165
- "February",
166
- "March",
167
- "April",
168
- "May",
169
- "June",
170
- "July",
171
- "August",
172
- "September",
173
- "October",
174
- "November",
175
- "December",
176
- ];
177
- export * from "./paging.types";
@@ -1,47 +0,0 @@
1
- /**
2
- * Represents the pagination IMetaData for a paginated response.
3
- */
4
- export interface IPagingResult {
5
- hasNextPage: boolean;
6
- totalPages: number;
7
- totalRecords: number;
8
- }
9
- /**
10
- * A generic wrapper that combines data with pagination information.
11
- * @template T - The type of data being paginated
12
- */
13
- export interface IDataWithPagingResult<T> {
14
- data: T;
15
- pagination: IPagingResult;
16
- }
17
- /**
18
- * Defines a sorting condition for query results.
19
- */
20
- export interface ISortCondition {
21
- name: string;
22
- direction: "ASC" | "DESC";
23
- }
24
- /**
25
- * Defines a filter condition for querying data.
26
- * Only one of valueString, valueNumber, or valueBoolean should be provided based on the field type.
27
- */
28
- export interface IFilterCondition {
29
- name: string;
30
- condition: "=" | ">" | "<" | "!=" | "LIKE" | "IN" | ">=" | "<=";
31
- valueString?: string;
32
- valueNumber?: number;
33
- valueBoolean?: boolean;
34
- useAnd?: boolean;
35
- }
36
- /**
37
- * Represents a request for paginated data with optional sorting and filtering.
38
- */
39
- export interface IPaginationRequest {
40
- page: number;
41
- size: number;
42
- sort?: ISortCondition[];
43
- filters?: IFilterCondition[];
44
- }
45
- export declare const createPagingObject: (page: number, size: number, sort?: ISortCondition[], filters?: IFilterCondition[]) => {
46
- pagination: IPaginationRequest;
47
- };
@@ -1 +0,0 @@
1
- export {};