dff-util 1.1.3 → 1.1.5
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/LICENSE +21 -0
- package/README.md +127 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/main/const-messages.d.ts +106 -0
- package/dist/main/const-messages.js +116 -0
- package/dist/main/const-type.d.ts +2 -0
- package/dist/main/http.d.ts +1 -1
- package/package.json +2 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 [DFF TECH]
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -214,6 +214,7 @@ export type SessionInfo = {
|
|
|
214
214
|
mobile?: string;
|
|
215
215
|
name?: string;
|
|
216
216
|
roles: string[];
|
|
217
|
+
type?: string;
|
|
217
218
|
requestId?: string;
|
|
218
219
|
token?: string;
|
|
219
220
|
iat?: number;
|
|
@@ -231,6 +232,7 @@ export type SessionUser = {
|
|
|
231
232
|
mobile?: string;
|
|
232
233
|
name?: string;
|
|
233
234
|
roles: string[];
|
|
235
|
+
type?: string;
|
|
234
236
|
};
|
|
235
237
|
```
|
|
236
238
|
|
|
@@ -245,6 +247,131 @@ ResponseType = {
|
|
|
245
247
|
|
|
246
248
|
```
|
|
247
249
|
|
|
250
|
+
## ConstMessages
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
export const ConstMessages = {
|
|
254
|
+
// Validation messages
|
|
255
|
+
REQUIRED: 'Required',
|
|
256
|
+
MIN_LENGTH_REQUIRED: 'Minimum length required',
|
|
257
|
+
MAX_LENGTH_EXCEED: 'Maximum length exceeded',
|
|
258
|
+
INVALID_DATA: 'Invalid data',
|
|
259
|
+
FIELD_MUST_BE_NUMERIC: 'This field must be numeric',
|
|
260
|
+
FIELD_MUST_BE_ALPHABETIC: 'This field must contain only letters',
|
|
261
|
+
FIELD_MUST_BE_ALPHANUMERIC: 'This field must contain only letters and numbers',
|
|
262
|
+
INVALID_EMAIL: 'Invalid email format',
|
|
263
|
+
INVALID_PHONE: 'Invalid phone number',
|
|
264
|
+
PASSWORD_TOO_WEAK: 'Password is too weak',
|
|
265
|
+
PASSWORDS_DO_NOT_MATCH: 'Passwords do not match',
|
|
266
|
+
INVALID_DATE_FORMAT: 'Invalid date format',
|
|
267
|
+
DATE_OUT_OF_RANGE: 'Date is out of acceptable range',
|
|
268
|
+
VALUE_TOO_LOW: 'Value is too low',
|
|
269
|
+
VALUE_TOO_HIGH: 'Value is too high',
|
|
270
|
+
EXCEEDS_MAX_CHARACTERS: 'Exceeds maximum character limit',
|
|
271
|
+
INVALID_URL: 'Invalid URL format',
|
|
272
|
+
INVALID_ZIP_CODE: 'Invalid zip/postal code',
|
|
273
|
+
ONLY_POSITIVE_NUMBERS: 'Only positive numbers are allowed',
|
|
274
|
+
INVALID_CREDIT_CARD: 'Invalid credit card number',
|
|
275
|
+
INVALID_FILE_TYPE: 'Unsupported file type',
|
|
276
|
+
FILE_TOO_LARGE: 'File size exceeds the maximum limit',
|
|
277
|
+
|
|
278
|
+
// Success messages
|
|
279
|
+
SUCCESS: 'Operation completed successfully',
|
|
280
|
+
SAVED_SUCCESSFULLY: 'Data saved successfully',
|
|
281
|
+
UPDATED_SUCCESSFULLY: 'Data updated successfully',
|
|
282
|
+
DELETED_SUCCESSFULLY: 'Data deleted successfully',
|
|
283
|
+
SUBMITTED_SUCCESSFULLY: 'Form submitted successfully',
|
|
284
|
+
EMAIL_SENT: 'Email sent successfully',
|
|
285
|
+
PASSWORD_CHANGED: 'Password changed successfully',
|
|
286
|
+
LOGGED_IN: 'Logged in successfully',
|
|
287
|
+
LOGGED_OUT: 'Logged out successfully',
|
|
288
|
+
UPLOAD_SUCCESSFUL: 'File uploaded successfully',
|
|
289
|
+
PAYMENT_SUCCESSFUL: 'Payment processed successfully',
|
|
290
|
+
DATA_FETCHED: 'Data fetched successfully',
|
|
291
|
+
DATA_LOADED: 'Data loaded successfully',
|
|
292
|
+
ACTION_COMPLETED: 'Action completed successfully',
|
|
293
|
+
|
|
294
|
+
// Error messages
|
|
295
|
+
WENT_WRONG: 'Something went wrong, please try again',
|
|
296
|
+
NOT_FOUND: 'Requested resource not found',
|
|
297
|
+
UNAUTHORIZED: 'You are not authorized to perform this action',
|
|
298
|
+
FORBIDDEN: 'Access to this resource is forbidden',
|
|
299
|
+
SERVER_ERROR: 'Internal server error, please contact support',
|
|
300
|
+
CONNECTION_ERROR: 'Unable to connect, please check your internet connection',
|
|
301
|
+
TIMEOUT_ERROR: 'The request timed out, please try again later',
|
|
302
|
+
VALIDATION_FAILED: 'Validation failed, please check the input',
|
|
303
|
+
DUPLICATE_ENTRY: 'Duplicate entry, please provide unique data',
|
|
304
|
+
SESSION_EXPIRED: 'Your session has expired, please log in again',
|
|
305
|
+
INVALID_SESSION: 'Invalid session, please authenticate',
|
|
306
|
+
RATE_LIMIT_EXCEEDED: 'Too many requests, please try again later',
|
|
307
|
+
RESOURCE_LOCKED: 'This resource is currently locked',
|
|
308
|
+
DATA_CORRUPTED: 'Data is corrupted',
|
|
309
|
+
SERVICE_UNAVAILABLE: 'Service is currently unavailable',
|
|
310
|
+
PAYMENT_FAILED: 'Payment failed, please check your details',
|
|
311
|
+
OPERATION_FAILED: 'Operation failed, please try again',
|
|
312
|
+
ACCESS_DENIED: 'Access denied',
|
|
313
|
+
INVALID_CREDENTIALS: 'Invalid credentials, please try again',
|
|
314
|
+
INVALID_TOKEN: 'Invalid token, please try again',
|
|
315
|
+
USER_NOT_FOUND: 'User not found, please try again',
|
|
316
|
+
PASSWORD_RESET_FAILED: 'Password reset failed, please try again',
|
|
317
|
+
|
|
318
|
+
// Informational Messages
|
|
319
|
+
NO_DATA_FOUND: 'No data found',
|
|
320
|
+
NO_RECORD_FOUND: 'No record found',
|
|
321
|
+
NO_RECORDS_FOUND: 'No records found',
|
|
322
|
+
NO_RECORDS_MATCHED: 'No records matched your search criteria',
|
|
323
|
+
NO_RECORDS_MATCHED_FILTER: 'No records matched your filter criteria',
|
|
324
|
+
LOADING: 'Loading, please wait...',
|
|
325
|
+
FETCHING_DATA: 'Fetching data, please wait...',
|
|
326
|
+
PROCESSING: 'Processing your request...',
|
|
327
|
+
PLEASE_WAIT: 'Please wait...',
|
|
328
|
+
NO_RESULTS_FOUND: 'No results found',
|
|
329
|
+
NO_DATA_AVAILABLE: 'No data available',
|
|
330
|
+
SEARCHING: 'Searching...',
|
|
331
|
+
REDIRECTING: 'Redirecting, please wait...',
|
|
332
|
+
CONNECTING: 'Connecting, please wait...',
|
|
333
|
+
LOGGING_OUT: 'Logging out, please wait...',
|
|
334
|
+
LOGGING_IN: 'Logging in, please wait...',
|
|
335
|
+
PREPARING_DOWNLOAD: 'Preparing your download...',
|
|
336
|
+
CHECKING_UPDATES: 'Checking for updates...',
|
|
337
|
+
|
|
338
|
+
// Confirmation Messages
|
|
339
|
+
CONFIRM_DELETE: 'Are you sure you want to delete this?',
|
|
340
|
+
CONFIRM_SAVE: 'Do you want to save changes?',
|
|
341
|
+
CONFIRM_SUBMIT: 'Do you want to submit this form?',
|
|
342
|
+
CONFIRM_LOGOUT: 'Are you sure you want to log out?',
|
|
343
|
+
CONFIRM_ACTION: 'Are you sure you want to proceed?',
|
|
344
|
+
CONFIRM_CLOSE: 'Are you sure you want to close this window?',
|
|
345
|
+
CONFIRM_CANCEL: 'Do you want to cancel this action?',
|
|
346
|
+
CONFIRM_RESTART: 'Do you want to restart the process?',
|
|
347
|
+
|
|
348
|
+
// Warning Messages
|
|
349
|
+
UNSAVED_CHANGES: 'You have unsaved changes. Do you want to discard them?',
|
|
350
|
+
LOW_BATTERY: 'Battery level is low, please connect your charger',
|
|
351
|
+
HIGH_USAGE: 'High system usage detected',
|
|
352
|
+
INCOMPLETE_FORM: 'The form is incomplete',
|
|
353
|
+
LIMIT_REACHED: 'You have reached the maximum limit',
|
|
354
|
+
OUTDATED_VERSION: 'You are using an outdated version of the application',
|
|
355
|
+
|
|
356
|
+
// General Messages
|
|
357
|
+
WELCOME: 'Welcome to the application',
|
|
358
|
+
GOODBYE: 'Goodbye, have a great day!',
|
|
359
|
+
HELLO: 'Hello, how can we help you today?',
|
|
360
|
+
THANK_YOU: 'Thank you for using our service',
|
|
361
|
+
TRY_AGAIN: 'Please try again',
|
|
362
|
+
UNDER_MAINTENANCE: 'The system is under maintenance, please check back later',
|
|
363
|
+
FEATURE_COMING_SOON: 'This feature is coming soon',
|
|
364
|
+
CONTACT_SUPPORT: 'If the issue persists, please contact support',
|
|
365
|
+
UPDATING: 'Updating, please wait...',
|
|
366
|
+
INSTALLING: 'Installing, please wait...',
|
|
367
|
+
RESTART_REQUIRED: 'A restart is required to apply changes',
|
|
368
|
+
RESTARTING: 'Restarting, please wait...',
|
|
369
|
+
LOADING_DATA: 'Loading data, please wait...',
|
|
370
|
+
SAVING: 'Saving, please wait...',
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
```
|
|
374
|
+
|
|
248
375
|
## file upload test
|
|
249
376
|
|
|
250
377
|
```
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -20,3 +20,4 @@ __exportStar(require("./main/http"), exports);
|
|
|
20
20
|
__exportStar(require("./main/regexr"), exports);
|
|
21
21
|
__exportStar(require("./main/const-value"), exports);
|
|
22
22
|
__exportStar(require("./main/const-type"), exports);
|
|
23
|
+
__exportStar(require("./main/const-messages"), exports);
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export declare const ConstMessages: {
|
|
2
|
+
REQUIRED: string;
|
|
3
|
+
MIN_LENGTH_REQUIRED: string;
|
|
4
|
+
MAX_LENGTH_EXCEED: string;
|
|
5
|
+
INVALID_DATA: string;
|
|
6
|
+
FIELD_MUST_BE_NUMERIC: string;
|
|
7
|
+
FIELD_MUST_BE_ALPHABETIC: string;
|
|
8
|
+
FIELD_MUST_BE_ALPHANUMERIC: string;
|
|
9
|
+
INVALID_EMAIL: string;
|
|
10
|
+
INVALID_PHONE: string;
|
|
11
|
+
PASSWORD_TOO_WEAK: string;
|
|
12
|
+
PASSWORDS_DO_NOT_MATCH: string;
|
|
13
|
+
INVALID_DATE_FORMAT: string;
|
|
14
|
+
DATE_OUT_OF_RANGE: string;
|
|
15
|
+
VALUE_TOO_LOW: string;
|
|
16
|
+
VALUE_TOO_HIGH: string;
|
|
17
|
+
EXCEEDS_MAX_CHARACTERS: string;
|
|
18
|
+
INVALID_URL: string;
|
|
19
|
+
INVALID_ZIP_CODE: string;
|
|
20
|
+
ONLY_POSITIVE_NUMBERS: string;
|
|
21
|
+
INVALID_CREDIT_CARD: string;
|
|
22
|
+
INVALID_FILE_TYPE: string;
|
|
23
|
+
FILE_TOO_LARGE: string;
|
|
24
|
+
SUCCESS: string;
|
|
25
|
+
SAVED_SUCCESSFULLY: string;
|
|
26
|
+
UPDATED_SUCCESSFULLY: string;
|
|
27
|
+
DELETED_SUCCESSFULLY: string;
|
|
28
|
+
SUBMITTED_SUCCESSFULLY: string;
|
|
29
|
+
EMAIL_SENT: string;
|
|
30
|
+
PASSWORD_CHANGED: string;
|
|
31
|
+
LOGGED_IN: string;
|
|
32
|
+
LOGGED_OUT: string;
|
|
33
|
+
UPLOAD_SUCCESSFUL: string;
|
|
34
|
+
PAYMENT_SUCCESSFUL: string;
|
|
35
|
+
DATA_FETCHED: string;
|
|
36
|
+
DATA_LOADED: string;
|
|
37
|
+
ACTION_COMPLETED: string;
|
|
38
|
+
WENT_WRONG: string;
|
|
39
|
+
NOT_FOUND: string;
|
|
40
|
+
UNAUTHORIZED: string;
|
|
41
|
+
FORBIDDEN: string;
|
|
42
|
+
SERVER_ERROR: string;
|
|
43
|
+
CONNECTION_ERROR: string;
|
|
44
|
+
TIMEOUT_ERROR: string;
|
|
45
|
+
VALIDATION_FAILED: string;
|
|
46
|
+
DUPLICATE_ENTRY: string;
|
|
47
|
+
SESSION_EXPIRED: string;
|
|
48
|
+
INVALID_SESSION: string;
|
|
49
|
+
RATE_LIMIT_EXCEEDED: string;
|
|
50
|
+
RESOURCE_LOCKED: string;
|
|
51
|
+
DATA_CORRUPTED: string;
|
|
52
|
+
SERVICE_UNAVAILABLE: string;
|
|
53
|
+
PAYMENT_FAILED: string;
|
|
54
|
+
OPERATION_FAILED: string;
|
|
55
|
+
ACCESS_DENIED: string;
|
|
56
|
+
INVALID_CREDENTIALS: string;
|
|
57
|
+
INVALID_TOKEN: string;
|
|
58
|
+
USER_NOT_FOUND: string;
|
|
59
|
+
PASSWORD_RESET_FAILED: string;
|
|
60
|
+
NO_DATA_FOUND: string;
|
|
61
|
+
NO_RECORD_FOUND: string;
|
|
62
|
+
NO_RECORDS_FOUND: string;
|
|
63
|
+
NO_RECORDS_MATCHED: string;
|
|
64
|
+
NO_RECORDS_MATCHED_FILTER: string;
|
|
65
|
+
LOADING: string;
|
|
66
|
+
FETCHING_DATA: string;
|
|
67
|
+
PROCESSING: string;
|
|
68
|
+
PLEASE_WAIT: string;
|
|
69
|
+
NO_RESULTS_FOUND: string;
|
|
70
|
+
NO_DATA_AVAILABLE: string;
|
|
71
|
+
SEARCHING: string;
|
|
72
|
+
REDIRECTING: string;
|
|
73
|
+
CONNECTING: string;
|
|
74
|
+
LOGGING_OUT: string;
|
|
75
|
+
LOGGING_IN: string;
|
|
76
|
+
PREPARING_DOWNLOAD: string;
|
|
77
|
+
CHECKING_UPDATES: string;
|
|
78
|
+
CONFIRM_DELETE: string;
|
|
79
|
+
CONFIRM_SAVE: string;
|
|
80
|
+
CONFIRM_SUBMIT: string;
|
|
81
|
+
CONFIRM_LOGOUT: string;
|
|
82
|
+
CONFIRM_ACTION: string;
|
|
83
|
+
CONFIRM_CLOSE: string;
|
|
84
|
+
CONFIRM_CANCEL: string;
|
|
85
|
+
CONFIRM_RESTART: string;
|
|
86
|
+
UNSAVED_CHANGES: string;
|
|
87
|
+
LOW_BATTERY: string;
|
|
88
|
+
HIGH_USAGE: string;
|
|
89
|
+
INCOMPLETE_FORM: string;
|
|
90
|
+
LIMIT_REACHED: string;
|
|
91
|
+
OUTDATED_VERSION: string;
|
|
92
|
+
WELCOME: string;
|
|
93
|
+
GOODBYE: string;
|
|
94
|
+
HELLO: string;
|
|
95
|
+
THANK_YOU: string;
|
|
96
|
+
TRY_AGAIN: string;
|
|
97
|
+
UNDER_MAINTENANCE: string;
|
|
98
|
+
FEATURE_COMING_SOON: string;
|
|
99
|
+
CONTACT_SUPPORT: string;
|
|
100
|
+
UPDATING: string;
|
|
101
|
+
INSTALLING: string;
|
|
102
|
+
RESTART_REQUIRED: string;
|
|
103
|
+
RESTARTING: string;
|
|
104
|
+
LOADING_DATA: string;
|
|
105
|
+
SAVING: string;
|
|
106
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConstMessages = void 0;
|
|
4
|
+
exports.ConstMessages = {
|
|
5
|
+
// Validation messages
|
|
6
|
+
REQUIRED: 'Required',
|
|
7
|
+
MIN_LENGTH_REQUIRED: 'Minimum length required',
|
|
8
|
+
MAX_LENGTH_EXCEED: 'Maximum length exceeded',
|
|
9
|
+
INVALID_DATA: 'Invalid data',
|
|
10
|
+
FIELD_MUST_BE_NUMERIC: 'This field must be numeric',
|
|
11
|
+
FIELD_MUST_BE_ALPHABETIC: 'This field must contain only letters',
|
|
12
|
+
FIELD_MUST_BE_ALPHANUMERIC: 'This field must contain only letters and numbers',
|
|
13
|
+
INVALID_EMAIL: 'Invalid email format',
|
|
14
|
+
INVALID_PHONE: 'Invalid phone number',
|
|
15
|
+
PASSWORD_TOO_WEAK: 'Password is too weak',
|
|
16
|
+
PASSWORDS_DO_NOT_MATCH: 'Passwords do not match',
|
|
17
|
+
INVALID_DATE_FORMAT: 'Invalid date format',
|
|
18
|
+
DATE_OUT_OF_RANGE: 'Date is out of acceptable range',
|
|
19
|
+
VALUE_TOO_LOW: 'Value is too low',
|
|
20
|
+
VALUE_TOO_HIGH: 'Value is too high',
|
|
21
|
+
EXCEEDS_MAX_CHARACTERS: 'Exceeds maximum character limit',
|
|
22
|
+
INVALID_URL: 'Invalid URL format',
|
|
23
|
+
INVALID_ZIP_CODE: 'Invalid zip/postal code',
|
|
24
|
+
ONLY_POSITIVE_NUMBERS: 'Only positive numbers are allowed',
|
|
25
|
+
INVALID_CREDIT_CARD: 'Invalid credit card number',
|
|
26
|
+
INVALID_FILE_TYPE: 'Unsupported file type',
|
|
27
|
+
FILE_TOO_LARGE: 'File size exceeds the maximum limit',
|
|
28
|
+
// Success messages
|
|
29
|
+
SUCCESS: 'Operation completed successfully',
|
|
30
|
+
SAVED_SUCCESSFULLY: 'Data saved successfully',
|
|
31
|
+
UPDATED_SUCCESSFULLY: 'Data updated successfully',
|
|
32
|
+
DELETED_SUCCESSFULLY: 'Data deleted successfully',
|
|
33
|
+
SUBMITTED_SUCCESSFULLY: 'Form submitted successfully',
|
|
34
|
+
EMAIL_SENT: 'Email sent successfully',
|
|
35
|
+
PASSWORD_CHANGED: 'Password changed successfully',
|
|
36
|
+
LOGGED_IN: 'Logged in successfully',
|
|
37
|
+
LOGGED_OUT: 'Logged out successfully',
|
|
38
|
+
UPLOAD_SUCCESSFUL: 'File uploaded successfully',
|
|
39
|
+
PAYMENT_SUCCESSFUL: 'Payment processed successfully',
|
|
40
|
+
DATA_FETCHED: 'Data fetched successfully',
|
|
41
|
+
DATA_LOADED: 'Data loaded successfully',
|
|
42
|
+
ACTION_COMPLETED: 'Action completed successfully',
|
|
43
|
+
// Error messages
|
|
44
|
+
WENT_WRONG: 'Something went wrong, please try again',
|
|
45
|
+
NOT_FOUND: 'Requested resource not found',
|
|
46
|
+
UNAUTHORIZED: 'You are not authorized to perform this action',
|
|
47
|
+
FORBIDDEN: 'Access to this resource is forbidden',
|
|
48
|
+
SERVER_ERROR: 'Internal server error, please contact support',
|
|
49
|
+
CONNECTION_ERROR: 'Unable to connect, please check your internet connection',
|
|
50
|
+
TIMEOUT_ERROR: 'The request timed out, please try again later',
|
|
51
|
+
VALIDATION_FAILED: 'Validation failed, please check the input',
|
|
52
|
+
DUPLICATE_ENTRY: 'Duplicate entry, please provide unique data',
|
|
53
|
+
SESSION_EXPIRED: 'Your session has expired, please log in again',
|
|
54
|
+
INVALID_SESSION: 'Invalid session, please authenticate',
|
|
55
|
+
RATE_LIMIT_EXCEEDED: 'Too many requests, please try again later',
|
|
56
|
+
RESOURCE_LOCKED: 'This resource is currently locked',
|
|
57
|
+
DATA_CORRUPTED: 'Data is corrupted',
|
|
58
|
+
SERVICE_UNAVAILABLE: 'Service is currently unavailable',
|
|
59
|
+
PAYMENT_FAILED: 'Payment failed, please check your details',
|
|
60
|
+
OPERATION_FAILED: 'Operation failed, please try again',
|
|
61
|
+
ACCESS_DENIED: 'Access denied',
|
|
62
|
+
INVALID_CREDENTIALS: 'Invalid credentials, please try again',
|
|
63
|
+
INVALID_TOKEN: 'Invalid token, please try again',
|
|
64
|
+
USER_NOT_FOUND: 'User not found, please try again',
|
|
65
|
+
PASSWORD_RESET_FAILED: 'Password reset failed, please try again',
|
|
66
|
+
// Informational Messages
|
|
67
|
+
NO_DATA_FOUND: 'No data found',
|
|
68
|
+
NO_RECORD_FOUND: 'No record found',
|
|
69
|
+
NO_RECORDS_FOUND: 'No records found',
|
|
70
|
+
NO_RECORDS_MATCHED: 'No records matched your search criteria',
|
|
71
|
+
NO_RECORDS_MATCHED_FILTER: 'No records matched your filter criteria',
|
|
72
|
+
LOADING: 'Loading, please wait...',
|
|
73
|
+
FETCHING_DATA: 'Fetching data, please wait...',
|
|
74
|
+
PROCESSING: 'Processing your request...',
|
|
75
|
+
PLEASE_WAIT: 'Please wait...',
|
|
76
|
+
NO_RESULTS_FOUND: 'No results found',
|
|
77
|
+
NO_DATA_AVAILABLE: 'No data available',
|
|
78
|
+
SEARCHING: 'Searching...',
|
|
79
|
+
REDIRECTING: 'Redirecting, please wait...',
|
|
80
|
+
CONNECTING: 'Connecting, please wait...',
|
|
81
|
+
LOGGING_OUT: 'Logging out, please wait...',
|
|
82
|
+
LOGGING_IN: 'Logging in, please wait...',
|
|
83
|
+
PREPARING_DOWNLOAD: 'Preparing your download...',
|
|
84
|
+
CHECKING_UPDATES: 'Checking for updates...',
|
|
85
|
+
// Confirmation Messages
|
|
86
|
+
CONFIRM_DELETE: 'Are you sure you want to delete this?',
|
|
87
|
+
CONFIRM_SAVE: 'Do you want to save changes?',
|
|
88
|
+
CONFIRM_SUBMIT: 'Do you want to submit this form?',
|
|
89
|
+
CONFIRM_LOGOUT: 'Are you sure you want to log out?',
|
|
90
|
+
CONFIRM_ACTION: 'Are you sure you want to proceed?',
|
|
91
|
+
CONFIRM_CLOSE: 'Are you sure you want to close this window?',
|
|
92
|
+
CONFIRM_CANCEL: 'Do you want to cancel this action?',
|
|
93
|
+
CONFIRM_RESTART: 'Do you want to restart the process?',
|
|
94
|
+
// Warning Messages
|
|
95
|
+
UNSAVED_CHANGES: 'You have unsaved changes. Do you want to discard them?',
|
|
96
|
+
LOW_BATTERY: 'Battery level is low, please connect your charger',
|
|
97
|
+
HIGH_USAGE: 'High system usage detected',
|
|
98
|
+
INCOMPLETE_FORM: 'The form is incomplete',
|
|
99
|
+
LIMIT_REACHED: 'You have reached the maximum limit',
|
|
100
|
+
OUTDATED_VERSION: 'You are using an outdated version of the application',
|
|
101
|
+
// General Messages
|
|
102
|
+
WELCOME: 'Welcome to the application',
|
|
103
|
+
GOODBYE: 'Goodbye, have a great day!',
|
|
104
|
+
HELLO: 'Hello, how can we help you today?',
|
|
105
|
+
THANK_YOU: 'Thank you for using our service',
|
|
106
|
+
TRY_AGAIN: 'Please try again',
|
|
107
|
+
UNDER_MAINTENANCE: 'The system is under maintenance, please check back later',
|
|
108
|
+
FEATURE_COMING_SOON: 'This feature is coming soon',
|
|
109
|
+
CONTACT_SUPPORT: 'If the issue persists, please contact support',
|
|
110
|
+
UPDATING: 'Updating, please wait...',
|
|
111
|
+
INSTALLING: 'Installing, please wait...',
|
|
112
|
+
RESTART_REQUIRED: 'A restart is required to apply changes',
|
|
113
|
+
RESTARTING: 'Restarting, please wait...',
|
|
114
|
+
LOADING_DATA: 'Loading data, please wait...',
|
|
115
|
+
SAVING: 'Saving, please wait...',
|
|
116
|
+
};
|
|
@@ -5,6 +5,7 @@ export type SessionInfo = {
|
|
|
5
5
|
name?: string;
|
|
6
6
|
roles: string[];
|
|
7
7
|
requestId?: string;
|
|
8
|
+
type?: string;
|
|
8
9
|
token?: string;
|
|
9
10
|
iat?: number;
|
|
10
11
|
exp?: number;
|
|
@@ -16,6 +17,7 @@ export type SessionUser = {
|
|
|
16
17
|
mobile?: string;
|
|
17
18
|
name?: string;
|
|
18
19
|
roles: string[];
|
|
20
|
+
type?: string;
|
|
19
21
|
};
|
|
20
22
|
export type ResponseType = {
|
|
21
23
|
status?: string | number;
|
package/dist/main/http.d.ts
CHANGED
|
@@ -25,5 +25,5 @@ export declare class Http {
|
|
|
25
25
|
static Token(sessionInfo: any, appKey: string, apiKey?: string, type?: RespType): Promise<any>;
|
|
26
26
|
static FormUpload(url: string, file: File, isHeadersAddMultiForm?: boolean, data?: Record<string, any>, headers?: any, method?: 'POST' | 'PUT', type?: RespType): Promise<any>;
|
|
27
27
|
static CloudUpload(fullUrl: string, file: File, headers?: any, method?: 'POST' | 'PUT'): Promise<Response>;
|
|
28
|
-
static FileDownload(fullUrl: string, params: any, headers?: any, method?: string): Promise<Buffer<
|
|
28
|
+
static FileDownload(fullUrl: string, params: any, headers?: any, method?: string): Promise<Buffer<ArrayBuffer>>;
|
|
29
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dff-util",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"util"
|
|
15
15
|
],
|
|
16
16
|
"author": "DesignForFeature",
|
|
17
|
-
"license": "
|
|
17
|
+
"license": "MIT",
|
|
18
18
|
"description": "DesignForFeature Utilities",
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/jwt-encode": "^1.0.3",
|