orak-util-ts 1.0.2 → 1.1.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.
- package/README.md +5 -2
- package/dist/orak-util-ts.cjs +1 -1
- package/dist/orak-util-ts.d.cts +172 -45
- package/dist/orak-util-ts.d.ts +172 -45
- package/dist/orak-util-ts.global.js +1 -1
- package/dist/orak-util-ts.js +1 -1
- package/package.json +14 -6
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
**Orak Software Utility Typescript Library**
|
|
2
2
|
|
|
3
3
|
# Fikeybean
|
|
4
4
|
|
|
@@ -7,8 +7,11 @@ This class wraps a map field with convenient methods.
|
|
|
7
7
|
|
|
8
8
|
# package.json çıkarılanlar
|
|
9
9
|
|
|
10
|
+
```js
|
|
10
11
|
esbuildOptions(options) {
|
|
11
12
|
//options.minifyIdentifiers = false; // Değişken ve class isimlerini küçültme
|
|
12
13
|
//options.keepNames = true; // Fonksiyon ve class isimlerini koru
|
|
13
14
|
console.log(options); // Burada ayarları kontrol et
|
|
14
|
-
},
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
```
|
package/dist/orak-util-ts.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(t,e)=>{for(var r in e)__defProp(t,r,{get:e[r],enumerable:!0})},__copyProps=(t,e,r,
|
|
1
|
+
"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(t,e)=>{for(var r in e)__defProp(t,r,{get:e[r],enumerable:!0})},__copyProps=(t,e,r,i)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let s of __getOwnPropNames(e))__hasOwnProp.call(t,s)||s===r||__defProp(t,s,{get:()=>e[s],enumerable:!(i=__getOwnPropDesc(e,s))||i.enumerable});return t},__toESM=(t,e,r)=>(r=null!=t?__create(__getProtoOf(t)):{},__copyProps(!e&&t&&t.__esModule?r:__defProp(r,"default",{value:t,enumerable:!0}),t)),__toCommonJS=t=>__copyProps(__defProp({},"__esModule",{value:!0}),t),src_exports={};__export(src_exports,{Fdr:()=>Fdr,FiApp:()=>FiApp,FiCol:()=>FiCol,FiConnConfig:()=>FiConnConfig,FiEnv:()=>FiEnv,FiFetchClient:()=>FiFetchClient,FiHttpClient:()=>FiHttpClient,FiKeyEntity:()=>FiKeyEntity,FiKeybean:()=>FiKeybean,FiLocalStorage:()=>FiLocalStorage,FiLog:()=>FiLog,FiLogger:()=>FiLogger,FiMeta:()=>FiMeta,FiNumber:()=>FiNumber,FiObject:()=>FiObject,FiQuery:()=>FiQuery,FiQueryUtil:()=>FiQueryUtil,FiQugen:()=>FiQugen,FiString:()=>FiString,FicList:()=>FicList,FimFiCol:()=>FimFiCol,FimFiReq:()=>FimFiReq,FimFiRes:()=>FimFiRes,FkbList:()=>FkbList}),module.exports=__toCommonJS(src_exports);var FiConnConfig=class{},FiQuery=class{},FiQueryUtil=class{},FiQugen=class{},FiNumber=class{static orZero(t){return null==t?0:t}static orMinusOne(t){return null==t?-1:t}},FiString=class{static cropWitDot(t,e){return this.crop(t,e,"..")}static crop(t,e,r=""){return t?t.length>e?t.substring(0,e)+r:t:""}static joinComma(t,e){return t&&0!==t.length?t.map(e).join(", "):""}static orEmpty(t){return null==t?"":t}},FiMeta=class _FiMeta{static create(t){let e=new _FiMeta;return e.fimTxKey=t,e}getTxKeyNtn(){return FiString.orEmpty(this.fimTxKey)}getTxValueNtn(){return FiString.orEmpty(this.fimTxValue)}getLnKeyOrMinusOne(){return FiNumber.orMinusOne(this.fimLnKey)}},FimFiRes=class{static fsBoTknValid(){return FiMeta.create("fsBoTknValid")}static fsBoResult(){return FiMeta.create("fsBoResult")}static fsRefFdr(){return FiMeta.create("fsRefFdr")}static fsRefValue(){return FiMeta.create("fsRefValue")}static fsTxVer(){return FiMeta.create("fsTxVer")}static fsTxMessage(){return FiMeta.create("fsTxMessage")}static fsLnErrorCode(){return FiMeta.create("fsLnErrorCode")}static fsTxToken(){return FiMeta.create("fsTxToken")}},FiObject=class{constructor(t){this.refValue=t||{}}getValueByFiMeta(t){return null==t||null==t||null==t.fimTxKey?null:this.refValue[t.getTxKeyNtn()]}getValueByFkb(t){return null==t||null==t||null==t.getFieldName()?null:this.refValue[t.getFieldName()]}},FimFiReq=class{static frTxProfile(){return FiMeta.create("frTxProfile")}static frTxUser(){return FiMeta.create("frTxUser")}static frTxPass(){return FiMeta.create("frTxPass")}static frTxToken(){return FiMeta.create("frTxToken")}static frFkbParams(){return FiMeta.create("frFkbParams")}static frBoShowDoc(){return FiMeta.create("frBoShowDoc")}static frTxDb(){return FiMeta.create("frTxDb")}},FiApp=class{},FiLogger=class{static debug(t,e,r){r&&r()&&console.log(t)}static error(t,e){}static errorFront(t,e){}},FiEnv=class{},FiKeyEntity=class{constructor(){this.mapData=new Map}fiPut(t,e){return this.mapData.set(t,e),this}fiGet(t){if(null!=t)return this.mapData.get(t)}},FiFetchClient=class{constructor(t,e={}){this.baseUrl=t,this.defaultHeaders=e}async request(t,e={}){const r=`${this.baseUrl}${t}`,i={...this.defaultHeaders,...e.headers||{}};try{const t=await fetch(r,{...e,headers:i});if(!t.ok)throw new Error(`Fetch error: ${t.status} - ${t.statusText}`);return t.headers.get("Content-Type")?.includes("application/json")?await t.json():await t.text()}catch(t){throw console.error("Request failed:",t),t}}async get(t,e){return this.request(t,{method:"GET",headers:e})}async post(t,e,r){return this.request(t,{method:"POST",headers:{"Content-Type":"application/json",...r},body:JSON.stringify(e)})}async put(t,e,r){return this.request(t,{method:"PUT",headers:{"Content-Type":"application/json",...r},body:JSON.stringify(e)})}async delete(t,e){return this.request(t,{method:"DELETE",headers:e})}},import_axios=__toESM(require("axios"),1),FiHttpClient=class{constructor(t,e=1e4,r){const i={"Content-Type":"application/json",...r?.getAsObject()};this.axiosInstance=import_axios.default.create({baseURL:t,timeout:e,headers:i}),this.initializeResponseInterceptor()}getAxiosInstance(){return this.axiosInstance}initializeResponseInterceptor(){this.axiosInstance.interceptors.response.use(this.handleResponse,this.handleError)}handleResponse(t){return Promise.resolve(t)}handleError(t){return console.error("API Hatası:",t),Promise.reject(t)}async get(t,e){return this.axiosInstance.get(t,e)}async post(t,e,r){return this.axiosInstance.post(t,e,r)}async put(t,e,r){return this.axiosInstance.put(t,e,r)}async delete(t,e){return this.axiosInstance.delete(t,e)}},Fdr=class{getLogListNtn(){return null==this.logList&&(this.logList=new Array),this.logList}},FiLog=class{},FiCol=class _FiCol{static bui(t,e){let r=new _FiCol;return r.fcTxFieldName=t,r.fcTxHeader=e,r}},FimFiCol=class{static fcTxDesc(){return FiMeta.create("fcTxDesc")}static fcTxPrefix(){return FiMeta.create("fcTxPrefix")}static fcTxEntityName(){return FiMeta.create("fcTxEntityName")}static fcTxFieldName(){return FiMeta.create("fcTxFieldName")}static fcTxFieldType(){return FiMeta.create("fcTxFieldType")}static fcTxHeader(){return FiMeta.create("fcTxHeader")}static fcTxDbField(){return FiMeta.create("fcTxDbField")}static fcTxRefField(){return FiMeta.create("fcTxRefField")}static fcLnLength(){return FiMeta.create("fcLnLength")}static fcLnPrecision(){return FiMeta.create("fcLnPrecision")}static fcLnScale(){return FiMeta.create("fcLnScale")}static fcBoNullable(){return FiMeta.create("fcBoNullable")}static fcTxIdType(){return FiMeta.create("fcTxIdType")}static fcBoTransient(){return FiMeta.create("fcBoTransient")}static fcBoUnique(){return FiMeta.create("fcBoUnique")}static fcBoUniqGro1(){return FiMeta.create("fcBoUniqGro1")}static fcTxDefValue(){return FiMeta.create("fcTxDefValue")}},FiKeybean=class{constructor(){this.mapData=new Map}fiPut(t,e){return this.mapData.set(t,e),this}fiGetAsStringNtn(t){return null==t?"":this.mapData.has(t)?this.mapData.get(t).toString():""}getAsStringNtn(t){return null==t?"":this.mapData.has(t)?this.mapData.get(t).toString():""}fiGet(t){if(null!=t)return this.mapData.get(t)}getAsObject(){const t={};for(const[e,r]of this.mapData.entries())t[e]=r;return t}addFieldByFiMeta(t,e){this.fiPut(t.getTxKeyNtn(),e)}addFieldByFm(t,e){this.addFieldByFiMeta(t,e)}getFieldName(){return this.fiGetAsStringNtn(FimFiCol.fcTxFieldName().fimTxKey)}isNumber(){const t=this.fiGetAsStringNtn(FimFiCol.fcTxFieldType().fimTxKey).toLowerCase();return"number"===t||"float"===t||"double"===t||"int"===t}},FkbList=class{constructor(){this.fkbList=[]}add(t){this.push(t)}push(t){this.fkbList.push(t)}getFkbListInit(){return null!=this.fkbList&&null!=this.fkbList||(this.fkbList=[]),this.fkbList}getArray(){return this.fkbList}},FicList=class{constructor(){this.ficList=[]}add(t){this.push(t)}push(t){this.ficList.push(t)}getFicListInit(){return null==this.ficList&&(this.ficList=[]),this.ficList}getFl(){return this.ficList}},FiLocalStorage=class{static set(t,e){try{const r="string"==typeof e?e:JSON.stringify(e);window.localStorage.setItem(t,r)}catch(t){console.error("FiLocalStorage.set error:",t)}}static get(t){try{const e=window.localStorage.getItem(t);if(null===e)return null;try{return JSON.parse(e)}catch{return e}}catch(t){return console.error("FiLocalStorage.get error:",t),null}}static remove(t){try{window.localStorage.removeItem(t)}catch(t){console.error("FiLocalStorage.remove error:",t)}}static clear(){try{window.localStorage.clear()}catch(t){console.error("FiLocalStorage.clear error:",t)}}static exist(t){try{return null!==window.localStorage.getItem(t)}catch(t){return console.error("FiLocalStorage.exist error:",t),!1}}};
|
package/dist/orak-util-ts.d.cts
CHANGED
|
@@ -1,4 +1,116 @@
|
|
|
1
|
-
import { AxiosRequestConfig } from 'axios';
|
|
1
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
|
+
|
|
3
|
+
declare class FiConnConfig {
|
|
4
|
+
txServer?: string;
|
|
5
|
+
txDatabase?: string;
|
|
6
|
+
txUsername?: string;
|
|
7
|
+
txPass?: string;
|
|
8
|
+
txDbType?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
declare class FiQuery {
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class FiQueryUtil {
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare class FiQugen {
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface IFiMeta {
|
|
24
|
+
fimTxKey?: string;
|
|
25
|
+
fimTxValue?: string;
|
|
26
|
+
fimLnKey?: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare class FiMeta implements IFiMeta {
|
|
30
|
+
fimTxKey?: string;
|
|
31
|
+
fimTxValue?: string;
|
|
32
|
+
fimLnKey?: number;
|
|
33
|
+
static create(txKey: string): FiMeta;
|
|
34
|
+
getTxKeyNtn(): string;
|
|
35
|
+
getTxValueNtn(): string;
|
|
36
|
+
getLnKeyOrMinusOne(): number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare class FimFiRes {
|
|
40
|
+
static fsBoTknValid(): FiMeta;
|
|
41
|
+
static fsBoResult(): FiMeta;
|
|
42
|
+
static fsRefFdr(): FiMeta;
|
|
43
|
+
static fsRefValue(): FiMeta;
|
|
44
|
+
static fsTxVer(): FiMeta;
|
|
45
|
+
static fsTxMessage(): FiMeta;
|
|
46
|
+
static fsLnErrorCode(): FiMeta;
|
|
47
|
+
static fsTxToken(): FiMeta;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare class FiKeybean {
|
|
51
|
+
mapData: Map<string, any>;
|
|
52
|
+
fiPut(txKey: string, value: any): FiKeybean;
|
|
53
|
+
fiGetAsStringNtn(txKey: string | undefined): string;
|
|
54
|
+
getAsStringNtn(txKey: string | undefined): string;
|
|
55
|
+
fiGet(txKey: string | undefined): any;
|
|
56
|
+
getAsObject(): Record<string, any>;
|
|
57
|
+
constructor();
|
|
58
|
+
addFieldByFiMeta(fiMeta: FiMeta, txValue: any): void;
|
|
59
|
+
/**
|
|
60
|
+
* addFieldByFiMeta shortcut method
|
|
61
|
+
*
|
|
62
|
+
* @param fiMeta
|
|
63
|
+
* @param txValue
|
|
64
|
+
*/
|
|
65
|
+
addFieldByFm(fiMeta: FiMeta, txValue: any): void;
|
|
66
|
+
getFieldName(): string;
|
|
67
|
+
isNumber(): boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare class FiObject {
|
|
71
|
+
refValue: Record<string, any>;
|
|
72
|
+
constructor(refValue?: Record<string, any>);
|
|
73
|
+
getValueByFiMeta(fiMeta: FiMeta): any;
|
|
74
|
+
getValueByFkb(fkb: FiKeybean): any;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
declare class FimFiReq {
|
|
78
|
+
static frTxProfile(): FiMeta;
|
|
79
|
+
static frTxUser(): FiMeta;
|
|
80
|
+
static frTxPass(): FiMeta;
|
|
81
|
+
static frTxToken(): FiMeta;
|
|
82
|
+
static frFkbParams(): FiMeta;
|
|
83
|
+
static frBoShowDoc(): FiMeta;
|
|
84
|
+
static frTxDb(): FiMeta;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface IFiBaseLogger {
|
|
88
|
+
debug(message: unknown, label?: string): void;
|
|
89
|
+
error(message: unknown, label?: string): void;
|
|
90
|
+
errorFront(message: unknown, label?: string): void;
|
|
91
|
+
checkDebugEnv(): boolean;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface IFiConfiger {
|
|
95
|
+
getFiConnConfig(connProfile: string): FiConnConfig;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* App ilgili objeler burada tutulur
|
|
100
|
+
*/
|
|
101
|
+
declare class FiApp {
|
|
102
|
+
static fiLogger?: IFiBaseLogger;
|
|
103
|
+
static fiConfiger?: IFiConfiger;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
declare class FiLogger {
|
|
107
|
+
static debug(message: unknown, label?: string, fnCheckDebug?: () => boolean): void;
|
|
108
|
+
static error(message: unknown, label?: string): void;
|
|
109
|
+
static errorFront(message: unknown, label?: string): void;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
declare class FiEnv {
|
|
113
|
+
}
|
|
2
114
|
|
|
3
115
|
declare class FiKeyEntity<T> {
|
|
4
116
|
mapData: Map<string, T>;
|
|
@@ -21,18 +133,10 @@ declare class FiFetchClient {
|
|
|
21
133
|
delete<T>(endpoint: string, headers?: HeadersInit): Promise<T>;
|
|
22
134
|
}
|
|
23
135
|
|
|
24
|
-
declare class FiKeybean {
|
|
25
|
-
mapData: Map<string, any>;
|
|
26
|
-
fiPut(txKey: string, value: any): FiKeybean;
|
|
27
|
-
fiGetAsStringNtn(txKey: string | undefined): string;
|
|
28
|
-
fiGet(txKey: string | undefined): any;
|
|
29
|
-
getAsObject(): Record<string, any>;
|
|
30
|
-
constructor();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
136
|
declare class FiHttpClient {
|
|
34
137
|
private axiosInstance;
|
|
35
138
|
constructor(baseURL: string, timeout?: number, fkbExtraHeaders?: FiKeybean);
|
|
139
|
+
getAxiosInstance(): AxiosInstance;
|
|
36
140
|
private initializeResponseInterceptor;
|
|
37
141
|
private handleResponse;
|
|
38
142
|
private handleError;
|
|
@@ -43,7 +147,7 @@ declare class FiHttpClient {
|
|
|
43
147
|
}
|
|
44
148
|
|
|
45
149
|
declare class FiString {
|
|
46
|
-
static cropWitDot(
|
|
150
|
+
static cropWitDot(txValue: string, arg1: number): string;
|
|
47
151
|
static crop(txValue: string, lnSize: number, txSuffix?: string): string;
|
|
48
152
|
static joinComma(iskProList: any, fnValue: (item: any) => any): any;
|
|
49
153
|
static orEmpty(value: string | undefined): string;
|
|
@@ -54,22 +158,6 @@ declare class FiNumber {
|
|
|
54
158
|
static orMinusOne(value: number | undefined): number;
|
|
55
159
|
}
|
|
56
160
|
|
|
57
|
-
interface IFiMeta {
|
|
58
|
-
fimTxKey?: string;
|
|
59
|
-
fimTxValue?: string;
|
|
60
|
-
fimLnKey?: number;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
declare class FiMeta implements IFiMeta {
|
|
64
|
-
fimTxKey?: string;
|
|
65
|
-
fimTxValue?: string;
|
|
66
|
-
fimLnKey?: number;
|
|
67
|
-
static create(txKey: string): FiMeta;
|
|
68
|
-
getTxKeyNtn(): string;
|
|
69
|
-
getTxValueNtn(): string;
|
|
70
|
-
getLnKeyOrMinusOne(): number;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
161
|
declare class FiLog {
|
|
74
162
|
logTxMessage?: string;
|
|
75
163
|
logTxType?: string;
|
|
@@ -92,23 +180,23 @@ declare class Fdr {
|
|
|
92
180
|
}
|
|
93
181
|
|
|
94
182
|
declare class FiCol {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
183
|
+
fcTxFieldName?: string;
|
|
184
|
+
fcTxHeader?: string;
|
|
185
|
+
fcTxDbFieldName?: string;
|
|
186
|
+
fcBoUniqGro1?: boolean;
|
|
187
|
+
fcBoNullable?: boolean;
|
|
188
|
+
fcBoUnique?: boolean;
|
|
189
|
+
fcBoUtfSupport?: boolean;
|
|
190
|
+
fcTxDefValue?: string;
|
|
191
|
+
fcTxCollation?: string;
|
|
192
|
+
fcTxTypeName?: string;
|
|
193
|
+
fcLnLength?: number;
|
|
194
|
+
fcLnPrecision?: number;
|
|
195
|
+
fcLnScale?: number;
|
|
196
|
+
fcBoFilterLike?: boolean;
|
|
197
|
+
fcTxFieldType?: string;
|
|
198
|
+
fcTxEntityName?: string;
|
|
199
|
+
fcBoTransient?: boolean;
|
|
112
200
|
txLabel?: string;
|
|
113
201
|
txGuid?: string;
|
|
114
202
|
ofiTxIdType?: string;
|
|
@@ -162,6 +250,11 @@ declare class FicList {
|
|
|
162
250
|
getFl(): FiCol[];
|
|
163
251
|
}
|
|
164
252
|
|
|
253
|
+
/**
|
|
254
|
+
* Güvenlik sebebiyle localStorage işlemlerini lokal sınıftan kullanın.
|
|
255
|
+
*
|
|
256
|
+
* Bu sınıf metodlarından örnek kullanımlarını görebilirsiniz
|
|
257
|
+
*/
|
|
165
258
|
declare class FiLocalStorage {
|
|
166
259
|
/**
|
|
167
260
|
* Anahtar ile localStorage'a veri kaydeder
|
|
@@ -192,4 +285,38 @@ declare class FiLocalStorage {
|
|
|
192
285
|
static exist(key: string): boolean;
|
|
193
286
|
}
|
|
194
287
|
|
|
195
|
-
|
|
288
|
+
declare class FimFiCol {
|
|
289
|
+
static fcTxDesc(): FiMeta;
|
|
290
|
+
static fcTxPrefix(): FiMeta;
|
|
291
|
+
static fcTxEntityName(): FiMeta;
|
|
292
|
+
static fcTxFieldName(): FiMeta;
|
|
293
|
+
static fcTxFieldType(): FiMeta;
|
|
294
|
+
static fcTxHeader(): FiMeta;
|
|
295
|
+
static fcTxDbField(): FiMeta;
|
|
296
|
+
static fcTxRefField(): FiMeta;
|
|
297
|
+
static fcLnLength(): FiMeta;
|
|
298
|
+
static fcLnPrecision(): FiMeta;
|
|
299
|
+
static fcLnScale(): FiMeta;
|
|
300
|
+
static fcBoNullable(): FiMeta;
|
|
301
|
+
static fcTxIdType(): FiMeta;
|
|
302
|
+
static fcBoTransient(): FiMeta;
|
|
303
|
+
static fcBoUnique(): FiMeta;
|
|
304
|
+
static fcBoUniqGro1(): FiMeta;
|
|
305
|
+
static fcTxDefValue(): FiMeta;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
interface IFiTableFic {
|
|
309
|
+
getITxTableName(): string;
|
|
310
|
+
getITxPrefix(): string;
|
|
311
|
+
genITableCols(): FicList;
|
|
312
|
+
genITableColsTrans(): FicList;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
interface IFiTableFkb {
|
|
316
|
+
getITxTableName(): string;
|
|
317
|
+
getITxPrefix(): string;
|
|
318
|
+
genITableCols(): FkbList;
|
|
319
|
+
genITableColsTrans(): FkbList;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export { Fdr, FiApp, FiCol, FiConnConfig, FiEnv, FiFetchClient, FiHttpClient, FiKeyEntity, FiKeybean, FiLocalStorage, FiLog, FiLogger, FiMeta, FiNumber, FiObject, FiQuery, FiQueryUtil, FiQugen, FiString, FicList, FimFiCol, FimFiReq, FimFiRes, FkbList, type IFiBaseLogger, type IFiConfiger, type IFiMeta, type IFiTableFic, type IFiTableFkb };
|
package/dist/orak-util-ts.d.ts
CHANGED
|
@@ -1,4 +1,116 @@
|
|
|
1
|
-
import { AxiosRequestConfig } from 'axios';
|
|
1
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
|
+
|
|
3
|
+
declare class FiConnConfig {
|
|
4
|
+
txServer?: string;
|
|
5
|
+
txDatabase?: string;
|
|
6
|
+
txUsername?: string;
|
|
7
|
+
txPass?: string;
|
|
8
|
+
txDbType?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
declare class FiQuery {
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class FiQueryUtil {
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare class FiQugen {
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface IFiMeta {
|
|
24
|
+
fimTxKey?: string;
|
|
25
|
+
fimTxValue?: string;
|
|
26
|
+
fimLnKey?: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare class FiMeta implements IFiMeta {
|
|
30
|
+
fimTxKey?: string;
|
|
31
|
+
fimTxValue?: string;
|
|
32
|
+
fimLnKey?: number;
|
|
33
|
+
static create(txKey: string): FiMeta;
|
|
34
|
+
getTxKeyNtn(): string;
|
|
35
|
+
getTxValueNtn(): string;
|
|
36
|
+
getLnKeyOrMinusOne(): number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare class FimFiRes {
|
|
40
|
+
static fsBoTknValid(): FiMeta;
|
|
41
|
+
static fsBoResult(): FiMeta;
|
|
42
|
+
static fsRefFdr(): FiMeta;
|
|
43
|
+
static fsRefValue(): FiMeta;
|
|
44
|
+
static fsTxVer(): FiMeta;
|
|
45
|
+
static fsTxMessage(): FiMeta;
|
|
46
|
+
static fsLnErrorCode(): FiMeta;
|
|
47
|
+
static fsTxToken(): FiMeta;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare class FiKeybean {
|
|
51
|
+
mapData: Map<string, any>;
|
|
52
|
+
fiPut(txKey: string, value: any): FiKeybean;
|
|
53
|
+
fiGetAsStringNtn(txKey: string | undefined): string;
|
|
54
|
+
getAsStringNtn(txKey: string | undefined): string;
|
|
55
|
+
fiGet(txKey: string | undefined): any;
|
|
56
|
+
getAsObject(): Record<string, any>;
|
|
57
|
+
constructor();
|
|
58
|
+
addFieldByFiMeta(fiMeta: FiMeta, txValue: any): void;
|
|
59
|
+
/**
|
|
60
|
+
* addFieldByFiMeta shortcut method
|
|
61
|
+
*
|
|
62
|
+
* @param fiMeta
|
|
63
|
+
* @param txValue
|
|
64
|
+
*/
|
|
65
|
+
addFieldByFm(fiMeta: FiMeta, txValue: any): void;
|
|
66
|
+
getFieldName(): string;
|
|
67
|
+
isNumber(): boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare class FiObject {
|
|
71
|
+
refValue: Record<string, any>;
|
|
72
|
+
constructor(refValue?: Record<string, any>);
|
|
73
|
+
getValueByFiMeta(fiMeta: FiMeta): any;
|
|
74
|
+
getValueByFkb(fkb: FiKeybean): any;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
declare class FimFiReq {
|
|
78
|
+
static frTxProfile(): FiMeta;
|
|
79
|
+
static frTxUser(): FiMeta;
|
|
80
|
+
static frTxPass(): FiMeta;
|
|
81
|
+
static frTxToken(): FiMeta;
|
|
82
|
+
static frFkbParams(): FiMeta;
|
|
83
|
+
static frBoShowDoc(): FiMeta;
|
|
84
|
+
static frTxDb(): FiMeta;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface IFiBaseLogger {
|
|
88
|
+
debug(message: unknown, label?: string): void;
|
|
89
|
+
error(message: unknown, label?: string): void;
|
|
90
|
+
errorFront(message: unknown, label?: string): void;
|
|
91
|
+
checkDebugEnv(): boolean;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface IFiConfiger {
|
|
95
|
+
getFiConnConfig(connProfile: string): FiConnConfig;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* App ilgili objeler burada tutulur
|
|
100
|
+
*/
|
|
101
|
+
declare class FiApp {
|
|
102
|
+
static fiLogger?: IFiBaseLogger;
|
|
103
|
+
static fiConfiger?: IFiConfiger;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
declare class FiLogger {
|
|
107
|
+
static debug(message: unknown, label?: string, fnCheckDebug?: () => boolean): void;
|
|
108
|
+
static error(message: unknown, label?: string): void;
|
|
109
|
+
static errorFront(message: unknown, label?: string): void;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
declare class FiEnv {
|
|
113
|
+
}
|
|
2
114
|
|
|
3
115
|
declare class FiKeyEntity<T> {
|
|
4
116
|
mapData: Map<string, T>;
|
|
@@ -21,18 +133,10 @@ declare class FiFetchClient {
|
|
|
21
133
|
delete<T>(endpoint: string, headers?: HeadersInit): Promise<T>;
|
|
22
134
|
}
|
|
23
135
|
|
|
24
|
-
declare class FiKeybean {
|
|
25
|
-
mapData: Map<string, any>;
|
|
26
|
-
fiPut(txKey: string, value: any): FiKeybean;
|
|
27
|
-
fiGetAsStringNtn(txKey: string | undefined): string;
|
|
28
|
-
fiGet(txKey: string | undefined): any;
|
|
29
|
-
getAsObject(): Record<string, any>;
|
|
30
|
-
constructor();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
136
|
declare class FiHttpClient {
|
|
34
137
|
private axiosInstance;
|
|
35
138
|
constructor(baseURL: string, timeout?: number, fkbExtraHeaders?: FiKeybean);
|
|
139
|
+
getAxiosInstance(): AxiosInstance;
|
|
36
140
|
private initializeResponseInterceptor;
|
|
37
141
|
private handleResponse;
|
|
38
142
|
private handleError;
|
|
@@ -43,7 +147,7 @@ declare class FiHttpClient {
|
|
|
43
147
|
}
|
|
44
148
|
|
|
45
149
|
declare class FiString {
|
|
46
|
-
static cropWitDot(
|
|
150
|
+
static cropWitDot(txValue: string, arg1: number): string;
|
|
47
151
|
static crop(txValue: string, lnSize: number, txSuffix?: string): string;
|
|
48
152
|
static joinComma(iskProList: any, fnValue: (item: any) => any): any;
|
|
49
153
|
static orEmpty(value: string | undefined): string;
|
|
@@ -54,22 +158,6 @@ declare class FiNumber {
|
|
|
54
158
|
static orMinusOne(value: number | undefined): number;
|
|
55
159
|
}
|
|
56
160
|
|
|
57
|
-
interface IFiMeta {
|
|
58
|
-
fimTxKey?: string;
|
|
59
|
-
fimTxValue?: string;
|
|
60
|
-
fimLnKey?: number;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
declare class FiMeta implements IFiMeta {
|
|
64
|
-
fimTxKey?: string;
|
|
65
|
-
fimTxValue?: string;
|
|
66
|
-
fimLnKey?: number;
|
|
67
|
-
static create(txKey: string): FiMeta;
|
|
68
|
-
getTxKeyNtn(): string;
|
|
69
|
-
getTxValueNtn(): string;
|
|
70
|
-
getLnKeyOrMinusOne(): number;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
161
|
declare class FiLog {
|
|
74
162
|
logTxMessage?: string;
|
|
75
163
|
logTxType?: string;
|
|
@@ -92,23 +180,23 @@ declare class Fdr {
|
|
|
92
180
|
}
|
|
93
181
|
|
|
94
182
|
declare class FiCol {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
183
|
+
fcTxFieldName?: string;
|
|
184
|
+
fcTxHeader?: string;
|
|
185
|
+
fcTxDbFieldName?: string;
|
|
186
|
+
fcBoUniqGro1?: boolean;
|
|
187
|
+
fcBoNullable?: boolean;
|
|
188
|
+
fcBoUnique?: boolean;
|
|
189
|
+
fcBoUtfSupport?: boolean;
|
|
190
|
+
fcTxDefValue?: string;
|
|
191
|
+
fcTxCollation?: string;
|
|
192
|
+
fcTxTypeName?: string;
|
|
193
|
+
fcLnLength?: number;
|
|
194
|
+
fcLnPrecision?: number;
|
|
195
|
+
fcLnScale?: number;
|
|
196
|
+
fcBoFilterLike?: boolean;
|
|
197
|
+
fcTxFieldType?: string;
|
|
198
|
+
fcTxEntityName?: string;
|
|
199
|
+
fcBoTransient?: boolean;
|
|
112
200
|
txLabel?: string;
|
|
113
201
|
txGuid?: string;
|
|
114
202
|
ofiTxIdType?: string;
|
|
@@ -162,6 +250,11 @@ declare class FicList {
|
|
|
162
250
|
getFl(): FiCol[];
|
|
163
251
|
}
|
|
164
252
|
|
|
253
|
+
/**
|
|
254
|
+
* Güvenlik sebebiyle localStorage işlemlerini lokal sınıftan kullanın.
|
|
255
|
+
*
|
|
256
|
+
* Bu sınıf metodlarından örnek kullanımlarını görebilirsiniz
|
|
257
|
+
*/
|
|
165
258
|
declare class FiLocalStorage {
|
|
166
259
|
/**
|
|
167
260
|
* Anahtar ile localStorage'a veri kaydeder
|
|
@@ -192,4 +285,38 @@ declare class FiLocalStorage {
|
|
|
192
285
|
static exist(key: string): boolean;
|
|
193
286
|
}
|
|
194
287
|
|
|
195
|
-
|
|
288
|
+
declare class FimFiCol {
|
|
289
|
+
static fcTxDesc(): FiMeta;
|
|
290
|
+
static fcTxPrefix(): FiMeta;
|
|
291
|
+
static fcTxEntityName(): FiMeta;
|
|
292
|
+
static fcTxFieldName(): FiMeta;
|
|
293
|
+
static fcTxFieldType(): FiMeta;
|
|
294
|
+
static fcTxHeader(): FiMeta;
|
|
295
|
+
static fcTxDbField(): FiMeta;
|
|
296
|
+
static fcTxRefField(): FiMeta;
|
|
297
|
+
static fcLnLength(): FiMeta;
|
|
298
|
+
static fcLnPrecision(): FiMeta;
|
|
299
|
+
static fcLnScale(): FiMeta;
|
|
300
|
+
static fcBoNullable(): FiMeta;
|
|
301
|
+
static fcTxIdType(): FiMeta;
|
|
302
|
+
static fcBoTransient(): FiMeta;
|
|
303
|
+
static fcBoUnique(): FiMeta;
|
|
304
|
+
static fcBoUniqGro1(): FiMeta;
|
|
305
|
+
static fcTxDefValue(): FiMeta;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
interface IFiTableFic {
|
|
309
|
+
getITxTableName(): string;
|
|
310
|
+
getITxPrefix(): string;
|
|
311
|
+
genITableCols(): FicList;
|
|
312
|
+
genITableColsTrans(): FicList;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
interface IFiTableFkb {
|
|
316
|
+
getITxTableName(): string;
|
|
317
|
+
getITxPrefix(): string;
|
|
318
|
+
genITableCols(): FkbList;
|
|
319
|
+
genITableColsTrans(): FkbList;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export { Fdr, FiApp, FiCol, FiConnConfig, FiEnv, FiFetchClient, FiHttpClient, FiKeyEntity, FiKeybean, FiLocalStorage, FiLog, FiLogger, FiMeta, FiNumber, FiObject, FiQuery, FiQueryUtil, FiQugen, FiString, FicList, FimFiCol, FimFiReq, FimFiRes, FkbList, type IFiBaseLogger, type IFiConfiger, type IFiMeta, type IFiTableFic, type IFiTableFkb };
|