@xrystal/core 3.3.7 → 3.4.3

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 (81) hide show
  1. package/bin/main-cli.js +71 -152
  2. package/package.json +11 -56
  3. package/source/project/index.d.ts +5 -6
  4. package/source/project/index.js +46 -77
  5. package/source/utils/constants/index.js +1 -1
  6. package/source/utils/models/classes/class.tmp-file-loader.d.ts +3 -6
  7. package/source/utils/models/classes/class.tmp-file-loader.js +23 -23
  8. package/x/dist/index.d.ts +2 -0
  9. package/x/dist/index.js +8 -0
  10. package/x/dist/loader/configs/index.d.ts +13 -0
  11. package/x/dist/loader/configs/index.js +17 -0
  12. package/x/dist/loader/events/index.d.ts +6 -0
  13. package/x/dist/loader/events/index.js +25 -0
  14. package/x/dist/loader/index.d.ts +6 -0
  15. package/x/dist/loader/index.js +6 -0
  16. package/x/dist/loader/localizations/index.d.ts +14 -0
  17. package/x/dist/loader/localizations/index.js +32 -0
  18. package/x/dist/loader/logger/index.d.ts +23 -0
  19. package/x/dist/loader/logger/index.js +126 -0
  20. package/x/dist/loader/system/index.d.ts +8 -0
  21. package/x/dist/loader/system/index.js +14 -0
  22. package/x/dist/project/index.d.ts +6 -0
  23. package/x/dist/project/index.js +63 -0
  24. package/x/dist/utils/constants/index.d.ts +8 -0
  25. package/x/dist/utils/constants/index.js +10 -0
  26. package/x/dist/utils/helpers/date/index.d.ts +16 -0
  27. package/x/dist/utils/helpers/date/index.js +48 -0
  28. package/x/dist/utils/helpers/filters/index.d.ts +17 -0
  29. package/x/dist/utils/helpers/filters/index.js +44 -0
  30. package/x/dist/utils/helpers/hash/crypto.d.ts +3 -0
  31. package/x/dist/utils/helpers/hash/crypto.js +22 -0
  32. package/x/dist/utils/helpers/id/index.d.ts +13 -0
  33. package/x/dist/utils/helpers/id/index.js +24 -0
  34. package/x/dist/utils/helpers/index.d.ts +16 -0
  35. package/x/dist/utils/helpers/index.js +16 -0
  36. package/x/dist/utils/helpers/ip/index.d.ts +1 -0
  37. package/x/dist/utils/helpers/ip/index.js +3 -0
  38. package/x/dist/utils/helpers/is/index.d.ts +11 -0
  39. package/x/dist/utils/helpers/is/index.js +35 -0
  40. package/x/dist/utils/helpers/locales/index.d.ts +52 -0
  41. package/x/dist/utils/helpers/locales/index.js +161 -0
  42. package/x/dist/utils/helpers/locales copy/index.d.ts +52 -0
  43. package/x/dist/utils/helpers/locales copy/index.js +161 -0
  44. package/x/dist/utils/helpers/math/index.d.ts +2 -0
  45. package/x/dist/utils/helpers/math/index.js +14 -0
  46. package/x/dist/utils/helpers/objects/index.d.ts +1 -0
  47. package/x/dist/utils/helpers/objects/index.js +55 -0
  48. package/x/dist/utils/helpers/path/index.d.ts +2 -0
  49. package/x/dist/utils/helpers/path/index.js +4 -0
  50. package/x/dist/utils/helpers/regex/checkSpecialRegexControl.d.ts +1 -0
  51. package/x/dist/utils/helpers/regex/checkSpecialRegexControl.js +3 -0
  52. package/x/dist/utils/helpers/string/index.d.ts +1 -0
  53. package/x/dist/utils/helpers/string/index.js +9 -0
  54. package/x/dist/utils/helpers/timer/index.d.ts +3 -0
  55. package/x/dist/utils/helpers/timer/index.js +5 -0
  56. package/x/dist/utils/helpers/tmp/index.d.ts +8 -0
  57. package/x/dist/utils/helpers/tmp/index.js +109 -0
  58. package/x/dist/utils/helpers/validates/index.d.ts +5 -0
  59. package/x/dist/utils/helpers/validates/index.js +20 -0
  60. package/x/dist/utils/index.d.ts +3 -0
  61. package/x/dist/utils/index.js +3 -0
  62. package/x/dist/utils/models/classes/class.controller.d.ts +121 -0
  63. package/x/dist/utils/models/classes/class.controller.js +421 -0
  64. package/x/dist/utils/models/classes/class.response.d.ts +17 -0
  65. package/x/dist/utils/models/classes/class.response.js +37 -0
  66. package/x/dist/utils/models/classes/class.services.d.ts +129 -0
  67. package/x/dist/utils/models/classes/class.services.js +344 -0
  68. package/x/dist/utils/models/classes/class.tmp-file-loader.d.ts +8 -0
  69. package/x/dist/utils/models/classes/class.tmp-file-loader.js +38 -0
  70. package/x/dist/utils/models/classes/class.x.d.ts +12 -0
  71. package/x/dist/utils/models/classes/class.x.js +16 -0
  72. package/x/dist/utils/models/enums/index.d.ts +117 -0
  73. package/x/dist/utils/models/enums/index.js +133 -0
  74. package/x/dist/utils/models/index.d.ts +8 -0
  75. package/x/dist/utils/models/index.js +8 -0
  76. package/x/dist/utils/models/types/index.d.ts +3 -0
  77. package/x/dist/utils/models/types/index.js +2 -0
  78. package/x/docker/Dockerfile +24 -0
  79. package/x/logs/critical/2025-11-30_critical.log +0 -0
  80. package/x/logs/error/2025-11-30_error.log +0 -0
  81. package/x/tmp.yml +0 -1
@@ -0,0 +1,52 @@
1
+ export declare const responseMessageHelper: {
2
+ successFully: (process?: string, event?: string, t?: any) => string;
3
+ unsuccessful: (process?: string, event?: string, t?: any) => string;
4
+ notFound: (process?: string, event?: string, t?: any) => string;
5
+ notMatch: (process?: string, event?: string, t?: any) => string;
6
+ notUse: (process?: string, event?: string, t?: any) => string;
7
+ invalid: (process?: string, event?: string, t?: any) => string;
8
+ checked: (process?: string, event?: string, t?: any) => string;
9
+ process: (process?: string, event?: string, t?: any) => string;
10
+ missingData: (process?: string, event?: string, t?: any) => string;
11
+ allreadyHave: (process?: string, event?: string, t?: any) => string;
12
+ wrongFormat: (process?: string, event?: string, t?: any) => string;
13
+ externalApiError: (process?: string, event?: string, t?: any) => string;
14
+ unauthorizedUrl: (process?: string, event?: string, t?: any) => string;
15
+ endpointNotWorking: (endpoint?: string, t?: any) => string;
16
+ schemaMissingDataChecks: (t?: any) => string;
17
+ schemaInvalidDataChecks: (t?: any) => string;
18
+ schemaUnknowErrorChecks: (a: any, b: any, t?: any) => string;
19
+ schemaUnknowErrorLogic: (a: any, b: any, t?: any) => string;
20
+ schemaUnknowErrorResponse: (a: any, b: any, t?: any) => string;
21
+ schemaUnknowErrorMain: (a: any, b: any, t?: any) => string;
22
+ dbQueryError: (process?: string, event?: string, t?: any) => string;
23
+ unknowError: (process?: string, event?: string, t?: any) => string;
24
+ serverError: (process?: string, event?: string, t?: any) => string;
25
+ emailWelcomeTemplateTitle: (t?: any) => string;
26
+ emailWelcomeTemplateExplanation: (t?: any) => string;
27
+ emailForgotPasswordTemplateTitle: (t?: any) => string;
28
+ emailForgotPasswordTemplateExplanation: (t?: any) => string;
29
+ allRightsReserved: (extra1?: string, extra2?: string, t?: any) => string;
30
+ emailButtonText: (t?: any) => string;
31
+ emailIgnoreText: (t?: any) => string;
32
+ welcomeMessage: (username?: string, t?: any) => string;
33
+ userIsBlocked: (extra1?: string, t?: any) => string;
34
+ passwordChangeCode: (username?: string, t?: any) => string;
35
+ notEnoughWalletBalance: (money?: string, currency?: string, t?: any) => string;
36
+ openAuthConsumerOverhang: (param1?: string, param2?: string, t?: any) => string;
37
+ thirdPartySystemOverhang: (param1?: string, param2?: string, t?: any) => string;
38
+ deviceOverhang: (param1?: string, param2?: string, t?: any) => string;
39
+ provisionOverhang: (money?: string, currency?: string, t?: any) => string;
40
+ balanceOverhang: (money?: string, currency?: string, t?: any) => string;
41
+ debtOverhang: (money?: string, currency?: string, t?: any) => string;
42
+ shipmentNotAccepted: (value1?: string, value2?: string, t?: any) => string;
43
+ optionsMethod: (methods?: string, t?: any) => string;
44
+ notAllowedCORS: (methods?: string, t?: any) => string;
45
+ missingCRSFToken: (t?: any) => string;
46
+ invalidCRSFToken: (t?: any) => string;
47
+ tooManyRequest: (t?: any) => string;
48
+ endpointNotFound: (t?: any) => string;
49
+ roleAccess: (error?: string, t?: any) => string;
50
+ authenticationRequiredTokenExpired: (t?: any) => string;
51
+ authenticationRequired: (t?: any) => string;
52
+ };
@@ -0,0 +1,161 @@
1
+ export const responseMessageHelper = {
2
+ 'successFully': (process = '', event = '', t) => {
3
+ return `${process + ' ' + event} ${t && t('responseMessage.successfully')}.`;
4
+ },
5
+ 'unsuccessful': (process = '', event = '', t) => {
6
+ return `${process + ' ' + event} ${t && t('responseMessage.unsuccessful')}.`;
7
+ },
8
+ 'notFound': (process = '', event = '', t) => {
9
+ return `${process + ' ' + event} ${t && t('responseMessage.notFound')}.`;
10
+ },
11
+ 'notMatch': (process = '', event = '', t) => {
12
+ return `${process + ' ' + event} ${t && t('responseMessage.notMatch')}.`;
13
+ },
14
+ 'notUse': (process = '', event = '', t) => {
15
+ return `${process + ' ' + event} ${t && t('responseMessage.notUse')}.`;
16
+ },
17
+ 'invalid': (process = '', event = '', t) => {
18
+ return `${process + ' ' + event} ${t && t('responseMessage.invalid')}.`;
19
+ },
20
+ 'checked': (process = '', event = '', t) => {
21
+ return `${process + ' ' + event} ${t && t('responseMessage.checked')}.`;
22
+ },
23
+ 'process': (process = '', event = '', t) => {
24
+ return `${process + ' ' + event} ${t && t('responseMessage.process')}.`;
25
+ },
26
+ 'missingData': (process = '', event = '', t) => {
27
+ return `${process + ' ' + event} ${t && t('responseMessage.missingData')}.`;
28
+ },
29
+ 'allreadyHave': (process = '', event = '', t) => {
30
+ return `${process + ' ' + event} ${t && t('responseMessage.allreadyHave')}.`;
31
+ },
32
+ 'wrongFormat': (process = '', event = '', t) => {
33
+ return `${process + ' ' + event} ${t && t('responseMessage.wrongFormat')}.`;
34
+ },
35
+ 'externalApiError': (process = '', event = '', t) => {
36
+ return `${process + ' ' + event}, ${t && t('responseMessage.externalApiError')}.`;
37
+ },
38
+ 'unauthorizedUrl': (process = '', event = '', t) => {
39
+ return `${process + ' ' + event}, ${t && t('responseMessage.unauthorizedUrl')}.`;
40
+ },
41
+ 'endpointNotWorking': (endpoint = '', t) => {
42
+ return `${endpoint}, ${t && t('responseMessage.endpointNotWorking')}.`;
43
+ },
44
+ // schema
45
+ // => special
46
+ 'schemaMissingDataChecks': (t) => {
47
+ return `${t && t('responseMessage.schemaMissingDataChecks')}.`;
48
+ },
49
+ 'schemaInvalidDataChecks': (t) => {
50
+ return `${t && t('responseMessage.schemaInvalidDataChecks')}.`;
51
+ },
52
+ 'schemaUnknowErrorChecks': (a, b, t) => {
53
+ return `${t && t('responseMessage.schemaUnknowErrorChecks')}. ${a}. ${t('responseMessage.schemaErrorExtraExplanation')}: ${b}`;
54
+ },
55
+ 'schemaUnknowErrorLogic': (a, b, t) => {
56
+ return `${t && t('responseMessage.schemaUnknowErrorLogic')}. ${a}. ${t('responseMessage.schemaErrorExtraExplanation')}: ${b}`;
57
+ },
58
+ 'schemaUnknowErrorResponse': (a, b, t) => {
59
+ return `${t && t('responseMessage.schemaUnknowErrorLogic')}. ${a}. ${t('responseMessage.schemaErrorExtraExplanation')}: ${b}`;
60
+ },
61
+ 'schemaUnknowErrorMain': (a, b, t) => {
62
+ return `${t && t('responseMessage.schemaUnknowErrorMain')}. ${a}. ${t('responseMessage.schemaErrorExtraExplanation')}: ${b}`;
63
+ },
64
+ //
65
+ 'dbQueryError': (process = '', event = '', t) => {
66
+ return `${t && t('responseMessage.dbQueryError')}. ${process + ' ' + event}`;
67
+ },
68
+ 'unknowError': (process = '', event = '', t) => {
69
+ return `${t && t('responseMessage.unknowError')}. ${process + ' ' + event}`;
70
+ },
71
+ 'serverError': (process = '', event = '', t) => {
72
+ return `${t && t('responseMessage.serverError')}. ${process + ' ' + event}`;
73
+ },
74
+ // specific
75
+ // => email
76
+ // => templates
77
+ 'emailWelcomeTemplateTitle': (t) => {
78
+ return `${t && t('responseMessage.emailWelcomeTemplateTitle')}`;
79
+ },
80
+ 'emailWelcomeTemplateExplanation': (t) => {
81
+ return `${t && t('responseMessage.emailWelcomeTemplateExplanation')}.`;
82
+ },
83
+ 'emailForgotPasswordTemplateTitle': (t) => {
84
+ return `${t && t('responseMessage.emailForgotPasswordTemplateTitle')}`;
85
+ },
86
+ 'emailForgotPasswordTemplateExplanation': (t) => {
87
+ return `${t && t('responseMessage.emailForgotPasswordTemplateExplanation')}.`;
88
+ },
89
+ //
90
+ 'allRightsReserved': (extra1 = '', extra2 = '', t) => {
91
+ return `${extra1 + ' ' + extra2}, ${t && t('responseMessage.allRightsReserved')}.`;
92
+ },
93
+ 'emailButtonText': (t) => {
94
+ return `${t && t('responseMessage.emailButtonText')}.`;
95
+ },
96
+ 'emailIgnoreText': (t) => {
97
+ return `${t && t('responseMessage.emailIgnoreText')}.`;
98
+ },
99
+ //
100
+ 'welcomeMessage': (username = '', t) => {
101
+ return `@${username} - ${t && t('responseMessage.welcome')}.`;
102
+ },
103
+ 'userIsBlocked': (extra1 = '', t) => {
104
+ return `${extra1}, ${t && t('responseMessage.userIsBlocked')}.`;
105
+ },
106
+ 'passwordChangeCode': (username = '', t) => {
107
+ return `@${username} - ${t && t('responseMessage.passwordChangeCode')}.`;
108
+ },
109
+ 'notEnoughWalletBalance': (money = '', currency = '', t) => {
110
+ return `${money + ' ' + currency}, ${t && t('responseMessage.notEnoughWalletBalance')}.`;
111
+ },
112
+ 'openAuthConsumerOverhang': (param1 = '', param2 = '', t) => {
113
+ return `${param1 + ' ' + param2}, ${t && t('responseMessage.openAuthConsumerOverhang')}.`;
114
+ },
115
+ 'thirdPartySystemOverhang': (param1 = '', param2 = '', t) => {
116
+ return `${param1 + ' ' + param2}, ${t && t('responseMessage.thirdPartySystems')}.`;
117
+ },
118
+ 'deviceOverhang': (param1 = '', param2 = '', t) => {
119
+ return `${param1 + ' ' + param2}, ${t && t('responseMessage.deviceOverhang')}.`;
120
+ },
121
+ 'provisionOverhang': (money = '', currency = '', t) => {
122
+ return `${money + ' ' + currency}, ${t && t('responseMessage.provisionOverhang')}.`;
123
+ },
124
+ 'balanceOverhang': (money = '', currency = '', t) => {
125
+ return `${money + ' ' + currency}, ${t && t('responseMessage.balanceOverhang')}.`;
126
+ },
127
+ 'debtOverhang': (money = '', currency = '', t) => {
128
+ return `${money + ' ' + currency}, ${t && t('responseMessage.debtOverhang')}.`;
129
+ },
130
+ 'shipmentNotAccepted': (value1 = '', value2 = '', t) => {
131
+ return `${t && t('responseMessage.shipmentNotAccepted')}. ${value1} ${value2}`;
132
+ },
133
+ // system
134
+ 'optionsMethod': (methods = '', t) => {
135
+ return `${t && t('responseMessage.optionsMethod')}. ${methods}`;
136
+ },
137
+ 'notAllowedCORS': (methods = '', t) => {
138
+ return `${t && t('responseMessage.notAllowedCORS')}. ${methods}`;
139
+ },
140
+ 'missingCRSFToken': (t) => {
141
+ return `${t && t('responseMessage.missingCSRFToken')}.`;
142
+ },
143
+ 'invalidCRSFToken': (t) => {
144
+ return `${t && t('responseMessage.invalidCSRFToken')}.`;
145
+ },
146
+ 'tooManyRequest': (t) => {
147
+ return `${t && t('responseMessage.tooManyRequest')}.`;
148
+ },
149
+ 'endpointNotFound': (t) => {
150
+ return `${t && t('responseMessage.endpointNotFound')}.`;
151
+ },
152
+ 'roleAccess': (error = '', t) => {
153
+ return `${t && t('responseMessage.roleAccess')}. ${error}`;
154
+ },
155
+ 'authenticationRequiredTokenExpired': (t) => {
156
+ return `${t && t('responseMessage.authenticationRequiredTokenExpired')}.`;
157
+ },
158
+ 'authenticationRequired': (t) => {
159
+ return `${t && t('responseMessage.authenticationRequired')}.`;
160
+ },
161
+ };
@@ -0,0 +1,52 @@
1
+ export declare const responseMessageHelper: {
2
+ successFully: (process?: string, event?: string, t?: any) => string;
3
+ unsuccessful: (process?: string, event?: string, t?: any) => string;
4
+ notFound: (process?: string, event?: string, t?: any) => string;
5
+ notMatch: (process?: string, event?: string, t?: any) => string;
6
+ notUse: (process?: string, event?: string, t?: any) => string;
7
+ invalid: (process?: string, event?: string, t?: any) => string;
8
+ checked: (process?: string, event?: string, t?: any) => string;
9
+ process: (process?: string, event?: string, t?: any) => string;
10
+ missingData: (process?: string, event?: string, t?: any) => string;
11
+ allreadyHave: (process?: string, event?: string, t?: any) => string;
12
+ wrongFormat: (process?: string, event?: string, t?: any) => string;
13
+ externalApiError: (process?: string, event?: string, t?: any) => string;
14
+ unauthorizedUrl: (process?: string, event?: string, t?: any) => string;
15
+ endpointNotWorking: (endpoint?: string, t?: any) => string;
16
+ schemaMissingDataChecks: (t?: any) => string;
17
+ schemaInvalidDataChecks: (t?: any) => string;
18
+ schemaUnknowErrorChecks: (a: any, b: any, t?: any) => string;
19
+ schemaUnknowErrorLogic: (a: any, b: any, t?: any) => string;
20
+ schemaUnknowErrorResponse: (a: any, b: any, t?: any) => string;
21
+ schemaUnknowErrorMain: (a: any, b: any, t?: any) => string;
22
+ dbQueryError: (process?: string, event?: string, t?: any) => string;
23
+ unknowError: (process?: string, event?: string, t?: any) => string;
24
+ serverError: (process?: string, event?: string, t?: any) => string;
25
+ emailWelcomeTemplateTitle: (t?: any) => string;
26
+ emailWelcomeTemplateExplanation: (t?: any) => string;
27
+ emailForgotPasswordTemplateTitle: (t?: any) => string;
28
+ emailForgotPasswordTemplateExplanation: (t?: any) => string;
29
+ allRightsReserved: (extra1?: string, extra2?: string, t?: any) => string;
30
+ emailButtonText: (t?: any) => string;
31
+ emailIgnoreText: (t?: any) => string;
32
+ welcomeMessage: (username?: string, t?: any) => string;
33
+ userIsBlocked: (extra1?: string, t?: any) => string;
34
+ passwordChangeCode: (username?: string, t?: any) => string;
35
+ notEnoughWalletBalance: (money?: string, currency?: string, t?: any) => string;
36
+ openAuthConsumerOverhang: (param1?: string, param2?: string, t?: any) => string;
37
+ thirdPartySystemOverhang: (param1?: string, param2?: string, t?: any) => string;
38
+ deviceOverhang: (param1?: string, param2?: string, t?: any) => string;
39
+ provisionOverhang: (money?: string, currency?: string, t?: any) => string;
40
+ balanceOverhang: (money?: string, currency?: string, t?: any) => string;
41
+ debtOverhang: (money?: string, currency?: string, t?: any) => string;
42
+ shipmentNotAccepted: (value1?: string, value2?: string, t?: any) => string;
43
+ optionsMethod: (methods?: string, t?: any) => string;
44
+ notAllowedCORS: (methods?: string, t?: any) => string;
45
+ missingCRSFToken: (t?: any) => string;
46
+ invalidCRSFToken: (t?: any) => string;
47
+ tooManyRequest: (t?: any) => string;
48
+ endpointNotFound: (t?: any) => string;
49
+ roleAccess: (error?: string, t?: any) => string;
50
+ authenticationRequiredTokenExpired: (t?: any) => string;
51
+ authenticationRequired: (t?: any) => string;
52
+ };
@@ -0,0 +1,161 @@
1
+ export const responseMessageHelper = {
2
+ 'successFully': (process = '', event = '', t) => {
3
+ return `${process + ' ' + event} ${t && t('responseMessage.successfully')}.`;
4
+ },
5
+ 'unsuccessful': (process = '', event = '', t) => {
6
+ return `${process + ' ' + event} ${t && t('responseMessage.unsuccessful')}.`;
7
+ },
8
+ 'notFound': (process = '', event = '', t) => {
9
+ return `${process + ' ' + event} ${t && t('responseMessage.notFound')}.`;
10
+ },
11
+ 'notMatch': (process = '', event = '', t) => {
12
+ return `${process + ' ' + event} ${t && t('responseMessage.notMatch')}.`;
13
+ },
14
+ 'notUse': (process = '', event = '', t) => {
15
+ return `${process + ' ' + event} ${t && t('responseMessage.notUse')}.`;
16
+ },
17
+ 'invalid': (process = '', event = '', t) => {
18
+ return `${process + ' ' + event} ${t && t('responseMessage.invalid')}.`;
19
+ },
20
+ 'checked': (process = '', event = '', t) => {
21
+ return `${process + ' ' + event} ${t && t('responseMessage.checked')}.`;
22
+ },
23
+ 'process': (process = '', event = '', t) => {
24
+ return `${process + ' ' + event} ${t && t('responseMessage.process')}.`;
25
+ },
26
+ 'missingData': (process = '', event = '', t) => {
27
+ return `${process + ' ' + event} ${t && t('responseMessage.missingData')}.`;
28
+ },
29
+ 'allreadyHave': (process = '', event = '', t) => {
30
+ return `${process + ' ' + event} ${t && t('responseMessage.allreadyHave')}.`;
31
+ },
32
+ 'wrongFormat': (process = '', event = '', t) => {
33
+ return `${process + ' ' + event} ${t && t('responseMessage.wrongFormat')}.`;
34
+ },
35
+ 'externalApiError': (process = '', event = '', t) => {
36
+ return `${process + ' ' + event}, ${t && t('responseMessage.externalApiError')}.`;
37
+ },
38
+ 'unauthorizedUrl': (process = '', event = '', t) => {
39
+ return `${process + ' ' + event}, ${t && t('responseMessage.unauthorizedUrl')}.`;
40
+ },
41
+ 'endpointNotWorking': (endpoint = '', t) => {
42
+ return `${endpoint}, ${t && t('responseMessage.endpointNotWorking')}.`;
43
+ },
44
+ // schema
45
+ // => special
46
+ 'schemaMissingDataChecks': (t) => {
47
+ return `${t && t('responseMessage.schemaMissingDataChecks')}.`;
48
+ },
49
+ 'schemaInvalidDataChecks': (t) => {
50
+ return `${t && t('responseMessage.schemaInvalidDataChecks')}.`;
51
+ },
52
+ 'schemaUnknowErrorChecks': (a, b, t) => {
53
+ return `${t && t('responseMessage.schemaUnknowErrorChecks')}. ${a}. ${t('responseMessage.schemaErrorExtraExplanation')}: ${b}`;
54
+ },
55
+ 'schemaUnknowErrorLogic': (a, b, t) => {
56
+ return `${t && t('responseMessage.schemaUnknowErrorLogic')}. ${a}. ${t('responseMessage.schemaErrorExtraExplanation')}: ${b}`;
57
+ },
58
+ 'schemaUnknowErrorResponse': (a, b, t) => {
59
+ return `${t && t('responseMessage.schemaUnknowErrorLogic')}. ${a}. ${t('responseMessage.schemaErrorExtraExplanation')}: ${b}`;
60
+ },
61
+ 'schemaUnknowErrorMain': (a, b, t) => {
62
+ return `${t && t('responseMessage.schemaUnknowErrorMain')}. ${a}. ${t('responseMessage.schemaErrorExtraExplanation')}: ${b}`;
63
+ },
64
+ //
65
+ 'dbQueryError': (process = '', event = '', t) => {
66
+ return `${t && t('responseMessage.dbQueryError')}. ${process + ' ' + event}`;
67
+ },
68
+ 'unknowError': (process = '', event = '', t) => {
69
+ return `${t && t('responseMessage.unknowError')}. ${process + ' ' + event}`;
70
+ },
71
+ 'serverError': (process = '', event = '', t) => {
72
+ return `${t && t('responseMessage.serverError')}. ${process + ' ' + event}`;
73
+ },
74
+ // specific
75
+ // => email
76
+ // => templates
77
+ 'emailWelcomeTemplateTitle': (t) => {
78
+ return `${t && t('responseMessage.emailWelcomeTemplateTitle')}`;
79
+ },
80
+ 'emailWelcomeTemplateExplanation': (t) => {
81
+ return `${t && t('responseMessage.emailWelcomeTemplateExplanation')}.`;
82
+ },
83
+ 'emailForgotPasswordTemplateTitle': (t) => {
84
+ return `${t && t('responseMessage.emailForgotPasswordTemplateTitle')}`;
85
+ },
86
+ 'emailForgotPasswordTemplateExplanation': (t) => {
87
+ return `${t && t('responseMessage.emailForgotPasswordTemplateExplanation')}.`;
88
+ },
89
+ //
90
+ 'allRightsReserved': (extra1 = '', extra2 = '', t) => {
91
+ return `${extra1 + ' ' + extra2}, ${t && t('responseMessage.allRightsReserved')}.`;
92
+ },
93
+ 'emailButtonText': (t) => {
94
+ return `${t && t('responseMessage.emailButtonText')}.`;
95
+ },
96
+ 'emailIgnoreText': (t) => {
97
+ return `${t && t('responseMessage.emailIgnoreText')}.`;
98
+ },
99
+ //
100
+ 'welcomeMessage': (username = '', t) => {
101
+ return `@${username} - ${t && t('responseMessage.welcome')}.`;
102
+ },
103
+ 'userIsBlocked': (extra1 = '', t) => {
104
+ return `${extra1}, ${t && t('responseMessage.userIsBlocked')}.`;
105
+ },
106
+ 'passwordChangeCode': (username = '', t) => {
107
+ return `@${username} - ${t && t('responseMessage.passwordChangeCode')}.`;
108
+ },
109
+ 'notEnoughWalletBalance': (money = '', currency = '', t) => {
110
+ return `${money + ' ' + currency}, ${t && t('responseMessage.notEnoughWalletBalance')}.`;
111
+ },
112
+ 'openAuthConsumerOverhang': (param1 = '', param2 = '', t) => {
113
+ return `${param1 + ' ' + param2}, ${t && t('responseMessage.openAuthConsumerOverhang')}.`;
114
+ },
115
+ 'thirdPartySystemOverhang': (param1 = '', param2 = '', t) => {
116
+ return `${param1 + ' ' + param2}, ${t && t('responseMessage.thirdPartySystems')}.`;
117
+ },
118
+ 'deviceOverhang': (param1 = '', param2 = '', t) => {
119
+ return `${param1 + ' ' + param2}, ${t && t('responseMessage.deviceOverhang')}.`;
120
+ },
121
+ 'provisionOverhang': (money = '', currency = '', t) => {
122
+ return `${money + ' ' + currency}, ${t && t('responseMessage.provisionOverhang')}.`;
123
+ },
124
+ 'balanceOverhang': (money = '', currency = '', t) => {
125
+ return `${money + ' ' + currency}, ${t && t('responseMessage.balanceOverhang')}.`;
126
+ },
127
+ 'debtOverhang': (money = '', currency = '', t) => {
128
+ return `${money + ' ' + currency}, ${t && t('responseMessage.debtOverhang')}.`;
129
+ },
130
+ 'shipmentNotAccepted': (value1 = '', value2 = '', t) => {
131
+ return `${t && t('responseMessage.shipmentNotAccepted')}. ${value1} ${value2}`;
132
+ },
133
+ // system
134
+ 'optionsMethod': (methods = '', t) => {
135
+ return `${t && t('responseMessage.optionsMethod')}. ${methods}`;
136
+ },
137
+ 'notAllowedCORS': (methods = '', t) => {
138
+ return `${t && t('responseMessage.notAllowedCORS')}. ${methods}`;
139
+ },
140
+ 'missingCRSFToken': (t) => {
141
+ return `${t && t('responseMessage.missingCSRFToken')}.`;
142
+ },
143
+ 'invalidCRSFToken': (t) => {
144
+ return `${t && t('responseMessage.invalidCSRFToken')}.`;
145
+ },
146
+ 'tooManyRequest': (t) => {
147
+ return `${t && t('responseMessage.tooManyRequest')}.`;
148
+ },
149
+ 'endpointNotFound': (t) => {
150
+ return `${t && t('responseMessage.endpointNotFound')}.`;
151
+ },
152
+ 'roleAccess': (error = '', t) => {
153
+ return `${t && t('responseMessage.roleAccess')}. ${error}`;
154
+ },
155
+ 'authenticationRequiredTokenExpired': (t) => {
156
+ return `${t && t('responseMessage.authenticationRequiredTokenExpired')}.`;
157
+ },
158
+ 'authenticationRequired': (t) => {
159
+ return `${t && t('responseMessage.authenticationRequired')}.`;
160
+ },
161
+ };
@@ -0,0 +1,2 @@
1
+ export declare function calcPercentace(value: number, percentage: number): number;
2
+ export declare function bankersRounding(value: number, decimals?: number): number;
@@ -0,0 +1,14 @@
1
+ export function calcPercentace(value, percentage) {
2
+ if (typeof value !== "number" || typeof percentage !== "number") {
3
+ throw new Error("Değerler sayısal olmalıdır.");
4
+ }
5
+ return (value * percentage) / 100;
6
+ }
7
+ export function bankersRounding(value, decimals = 2) {
8
+ const factor = Math.pow(10, decimals);
9
+ const rounded = Math.round(value * factor);
10
+ const isHalf = (value * factor) % 1 === 0.5;
11
+ return isHalf && rounded % 2 !== 0
12
+ ? (rounded - 1) / factor
13
+ : rounded / factor;
14
+ }
@@ -0,0 +1 @@
1
+ export declare function pickProps<T extends object, K extends keyof T>(obj: T | null | undefined, props: (K | string)[]): Pick<T, K>;
@@ -0,0 +1,55 @@
1
+ export function pickProps(obj, props) {
2
+ if (!obj) {
3
+ return {};
4
+ }
5
+ const negativeProps = new Set();
6
+ const positiveProps = new Set();
7
+ for (const p of props) {
8
+ if (typeof p === 'string' && p.startsWith('-')) {
9
+ negativeProps.add(p.substring(1));
10
+ }
11
+ else {
12
+ positiveProps.add(p);
13
+ }
14
+ }
15
+ function getNestedValue(o, path) {
16
+ return path.reduce((acc, key) => (acc && acc[key] !== undefined ? acc[key] : undefined), o);
17
+ }
18
+ function setNestedValue(o, path, value) {
19
+ let current = o;
20
+ for (let i = 0; i < path.length - 1; i++) {
21
+ if (!(path[i] in current))
22
+ current[path[i]] = {};
23
+ current = current[path[i]];
24
+ }
25
+ current[path[path.length - 1]] = value;
26
+ }
27
+ if (negativeProps.size > 0) {
28
+ const result = {};
29
+ function recurse(currentObj, currentPath = [], resObj) {
30
+ for (const key in currentObj) {
31
+ const fullPath = [...currentPath, key].join('.');
32
+ if (!Array.from(negativeProps).some(neg => fullPath === neg || fullPath.startsWith(neg + '.'))) {
33
+ if (typeof currentObj[key] === 'object' && currentObj[key] !== null && !Array.isArray(currentObj[key])) {
34
+ resObj[key] = {};
35
+ recurse(currentObj[key], [...currentPath, key], resObj[key]);
36
+ }
37
+ else {
38
+ resObj[key] = currentObj[key];
39
+ }
40
+ }
41
+ }
42
+ }
43
+ recurse(obj, [], result);
44
+ return result;
45
+ }
46
+ const result = {};
47
+ for (const p of positiveProps) {
48
+ const path = p.split('.');
49
+ const value = getNestedValue(obj, path);
50
+ if (value !== undefined) {
51
+ setNestedValue(result, path, value);
52
+ }
53
+ }
54
+ return result;
55
+ }
@@ -0,0 +1,2 @@
1
+ export declare const __filename: (metaUrl: string) => string;
2
+ export declare const __dirname: (metaUrl: string) => string;
@@ -0,0 +1,4 @@
1
+ import path from "path";
2
+ import { fileURLToPath } from "url";
3
+ export const __filename = (metaUrl) => fileURLToPath(metaUrl);
4
+ export const __dirname = (metaUrl) => path.dirname(fileURLToPath(metaUrl));
@@ -0,0 +1 @@
1
+ export declare function checkSpecialRegexControl(str: string, regex: RegExp): boolean;
@@ -0,0 +1,3 @@
1
+ export function checkSpecialRegexControl(str, regex) {
2
+ return regex.test(str);
3
+ }
@@ -0,0 +1 @@
1
+ export declare function cleanStringForNormalize(input: string): string;
@@ -0,0 +1,9 @@
1
+ export function cleanStringForNormalize(input) {
2
+ if (typeof input !== 'string')
3
+ return '';
4
+ const cleaned = input
5
+ .normalize('NFD')
6
+ .replace(/\u0307/g, '')
7
+ .normalize('NFC');
8
+ return cleaned;
9
+ }
@@ -0,0 +1,3 @@
1
+ export declare function delay({ duration, }: {
2
+ duration: number;
3
+ }): Promise<unknown>;
@@ -0,0 +1,5 @@
1
+ export async function delay({ duration, }) {
2
+ return new Promise((resolve, reject) => {
3
+ setTimeout(() => resolve(delay), duration);
4
+ });
5
+ }
@@ -0,0 +1,8 @@
1
+ export declare function resolveObjWithHandlebars(obj: any, context: any): any;
2
+ export declare function findFileRecursively(startDir: string, baseName: string, extName?: string, excludedDirs?: string[]): string | null;
3
+ export declare const argvsConverter: (argvs: string) => {
4
+ [key: string]: string;
5
+ };
6
+ export declare const findExt: (filename: string) => string;
7
+ export declare const changeExtensions: (filename: string, repalceExt: string) => string;
8
+ export declare const webFileFindEngine: (folderPath: string) => string[];