@putkoff/abstract-utilities 0.1.125 → 0.1.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/functions/fetch_utils/src/fetchIt_utils.d.ts +2 -1
- package/dist/cjs/index.js +3 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/functions/fetch_utils/src/fetchIt_utils.d.ts +2 -1
- package/dist/esm/index.js +3 -11
- package/dist/esm/index.js.map +1 -1
- package/dist/functions/fetch_utils/src/fetchIt_utils.d.ts +2 -1
- package/dist/index.d.ts +25 -25
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -145,22 +145,6 @@ declare function get_window_location(): Location | "https://abstractendeavors.co
|
|
|
145
145
|
declare function get_window_pathname(): string | null;
|
|
146
146
|
declare function get_window_parts(): Location | "https://abstractendeavors.com" | null;
|
|
147
147
|
|
|
148
|
-
/**
|
|
149
|
-
|
|
150
|
-
***Changes**: None, as it’s self-contained and doesn’t rely on external imports.
|
|
151
|
-
*
|
|
152
|
-
*4. **secureFetchIt** (`src/functions/fetch/secureFetchIt.ts`):
|
|
153
|
-
* Since `secureFetchIt` isn’t provided, we’ll create a minimal implementation based on its usage in `Login` and `uploadFiles`. It’s assumed to be a wrapper around `fetch` that handles authentication and JSON parsing.
|
|
154
|
-
*
|
|
155
|
-
*/
|
|
156
|
-
/** Pulls base-URL from AppConfig.API_BASE_URL, strips trailing slashes */
|
|
157
|
-
declare function get_app_config_url(endpoint: string, appKey?: any): Promise<string>;
|
|
158
|
-
declare function fetchIt(endpoint: string, body?: unknown, method?: string | null, headers?: Record<string, string> | null, blob?: boolean | null, no_api?: boolean, requireAuth?: boolean): Promise<unknown>;
|
|
159
|
-
declare function secureFetchIt<T>(endpoint: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, noApi?: boolean, withCredentials?: boolean, returnJson?: boolean, returnReult?: boolean): Promise<T>;
|
|
160
|
-
declare function secureFetchIt(endpoint: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, noApi?: boolean, withCredentials?: boolean, returnJson?: boolean, returnReult?: boolean): Promise<Blob>;
|
|
161
|
-
declare function requestPatch(url: string, body?: unknown): Promise<Response>;
|
|
162
|
-
declare function fetchSharePatch(file: unknown, appKey?: any): Promise<void>;
|
|
163
|
-
|
|
164
148
|
declare function get_dirname(filePath: string | null): string;
|
|
165
149
|
declare function get_basename(filePath: string | null): string;
|
|
166
150
|
declare function get_filename(file_path: string): string;
|
|
@@ -213,8 +197,6 @@ declare function getDbConfigsPath(): string;
|
|
|
213
197
|
declare function getSchemasPath(): string;
|
|
214
198
|
declare function getSchemasDirPath(subPath: string): string;
|
|
215
199
|
|
|
216
|
-
declare function alertit(obj?: any): void;
|
|
217
|
-
|
|
218
200
|
declare function getSubstring(obj: string, maxLength?: number | null, minLength?: number | null): string;
|
|
219
201
|
declare function truncateString(obj: string, maxLength?: number): string;
|
|
220
202
|
/**
|
|
@@ -255,8 +237,33 @@ declare function eatOuter(str: string, listObjects: string | string[]): string;
|
|
|
255
237
|
declare function eatAll(str: string, listObjects: string | string[]): string;
|
|
256
238
|
declare function eatEnd(obj: string, endings?: string[]): string;
|
|
257
239
|
|
|
240
|
+
declare function alertit(obj?: any): void;
|
|
241
|
+
|
|
258
242
|
declare function ensure_list<T>(obj: T | T[]): T[];
|
|
259
243
|
|
|
244
|
+
/**
|
|
245
|
+
* getConfig(): load the full AppConfig
|
|
246
|
+
* getConfig(key): load just that key
|
|
247
|
+
*/
|
|
248
|
+
declare function getConfig(): Promise<AppConfig>;
|
|
249
|
+
declare function getConfig<K extends keyof AppConfig>(key: K): Promise<AppConfig[K]>;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
|
|
253
|
+
***Changes**: None, as it’s self-contained and doesn’t rely on external imports.
|
|
254
|
+
*
|
|
255
|
+
*4. **secureFetchIt** (`src/functions/fetch/secureFetchIt.ts`):
|
|
256
|
+
* Since `secureFetchIt` isn’t provided, we’ll create a minimal implementation based on its usage in `Login` and `uploadFiles`. It’s assumed to be a wrapper around `fetch` that handles authentication and JSON parsing.
|
|
257
|
+
*
|
|
258
|
+
*/
|
|
259
|
+
/** Pulls base-URL from AppConfig.API_BASE_URL, strips trailing slashes */
|
|
260
|
+
declare function get_app_config_url(endpoint: string, appKey?: keyof AppConfig): Promise<string>;
|
|
261
|
+
declare function fetchIt(endpoint: string, body?: unknown, method?: string | null, headers?: Record<string, string> | null, blob?: boolean | null, no_api?: boolean, requireAuth?: boolean): Promise<unknown>;
|
|
262
|
+
declare function secureFetchIt<T>(endpoint: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, noApi?: boolean, withCredentials?: boolean, returnJson?: boolean, returnReult?: boolean): Promise<T>;
|
|
263
|
+
declare function secureFetchIt(endpoint: any, body?: any, method?: any, headers?: Record<string, string> | null, blob?: boolean, noApi?: boolean, withCredentials?: boolean, returnJson?: boolean, returnReult?: boolean): Promise<Blob>;
|
|
264
|
+
declare function requestPatch(url: string, body?: unknown): Promise<Response>;
|
|
265
|
+
declare function fetchSharePatch(file: unknown, appKey?: any): Promise<void>;
|
|
266
|
+
|
|
260
267
|
declare function Button({ children, color, variant, className, ...rest }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
261
268
|
color?: 'gray' | 'green' | 'blue';
|
|
262
269
|
variant?: 'default' | 'icon' | 'primary' | 'secondary';
|
|
@@ -274,13 +281,6 @@ declare function Input({ label, trailing, ...rest }: React$1.InputHTMLAttributes
|
|
|
274
281
|
|
|
275
282
|
declare function Spinner(): react_jsx_runtime.JSX.Element;
|
|
276
283
|
|
|
277
|
-
/**
|
|
278
|
-
* getConfig(): load the full AppConfig
|
|
279
|
-
* getConfig(key): load just that key
|
|
280
|
-
*/
|
|
281
|
-
declare function getConfig(): Promise<AppConfig>;
|
|
282
|
-
declare function getConfig<K extends keyof AppConfig>(key: K): Promise<AppConfig[K]>;
|
|
283
|
-
|
|
284
284
|
/**
|
|
285
285
|
* Reads a file at `relativeOrAbsolutePath` and returns its contents as a string.
|
|
286
286
|
* In a browser this will reject immediately.
|