@apia/api 2.0.9 → 2.0.10
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/ApiaApiContext.js +15 -0
- package/dist/ApiaApiContext.js.map +1 -0
- package/dist/ApiaApiHandler.d.ts +62 -0
- package/dist/ApiaApiHandler.d.ts.map +1 -0
- package/dist/ApiaApiHandler.js +374 -0
- package/dist/ApiaApiHandler.js.map +1 -0
- package/dist/apiaApi.d.ts +156 -0
- package/dist/apiaApi.d.ts.map +1 -0
- package/dist/apiaApi.js +458 -0
- package/dist/apiaApi.js.map +1 -0
- package/dist/buttons/ApiaApiButtonsContainer.js +129 -0
- package/dist/buttons/ApiaApiButtonsContainer.js.map +1 -0
- package/dist/fields/ApiaApiCheckbox.js +39 -0
- package/dist/fields/ApiaApiCheckbox.js.map +1 -0
- package/dist/fields/ApiaApiFieldsContainer.js +213 -0
- package/dist/fields/ApiaApiFieldsContainer.js.map +1 -0
- package/dist/fields/ApiaApiFileInput.js +34 -0
- package/dist/fields/ApiaApiFileInput.js.map +1 -0
- package/dist/fields/ApiaApiInput.d.ts +20 -0
- package/dist/fields/ApiaApiInput.d.ts.map +1 -0
- package/dist/fields/ApiaApiInput.js +110 -0
- package/dist/fields/ApiaApiInput.js.map +1 -0
- package/dist/fields/ApiaApiRadio.js +43 -0
- package/dist/fields/ApiaApiRadio.js.map +1 -0
- package/dist/fields/ApiaApiSelect.js +64 -0
- package/dist/fields/ApiaApiSelect.js.map +1 -0
- package/dist/fields/ApiaApiTextArea.js +50 -0
- package/dist/fields/ApiaApiTextArea.js.map +1 -0
- package/dist/index.d.ts +4 -297
- package/dist/index.js +3 -3212
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +39 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +4 -4
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
|
+
import QueryString from 'qs';
|
|
3
|
+
import { TNotificationMessage } from '@apia/notifications';
|
|
4
|
+
import { IModalConfig, THandleConfiguration } from './ApiaApiHandler.js';
|
|
5
|
+
import { TApiaApiAxiosResponse } from './apiaApi.js';
|
|
6
|
+
import { TApiaLoad } from '@apia/util';
|
|
7
|
+
import { TModal } from '@apia/components';
|
|
8
|
+
|
|
9
|
+
interface TColors {
|
|
10
|
+
exception?: string;
|
|
11
|
+
alert?: string;
|
|
12
|
+
message?: string;
|
|
13
|
+
}
|
|
14
|
+
type TApiaApiResult<LoadType> = Promise<TApiaApiAxiosResponse<(LoadType & TNotificationMessage) | null> | null>;
|
|
15
|
+
interface IApiaApiConsoleConfig {
|
|
16
|
+
colors?: TColors;
|
|
17
|
+
debug?: boolean;
|
|
18
|
+
}
|
|
19
|
+
type TSetModalProps = (configuration: THandleConfiguration, formDefinition?: TApiaLoad) => TModal | null;
|
|
20
|
+
interface IApiaApiRequestConfig<DataType> extends IApiaApiConsoleConfig {
|
|
21
|
+
axiosConfig?: AxiosRequestConfig;
|
|
22
|
+
modalConfiguration?: IModalConfig;
|
|
23
|
+
handleLoad?: boolean;
|
|
24
|
+
setModalProps?: TSetModalProps;
|
|
25
|
+
/**
|
|
26
|
+
* Algunas veces las funciones llamadas por una acción en el servidor
|
|
27
|
+
* tienen el mismo nombre siendo en realidad funciones distintas. Para
|
|
28
|
+
* corregir este problema es posible pasar un path relativo al directorio
|
|
29
|
+
* apiaApi/methods
|
|
30
|
+
*/
|
|
31
|
+
methodsPath?: string;
|
|
32
|
+
notificationsCategory?: string;
|
|
33
|
+
queryData?: string | Record<string, unknown>;
|
|
34
|
+
stringifyOptions?: QueryString.IStringifyOptions;
|
|
35
|
+
validateResponse?: (response: AxiosResponse<DataType | null>) => Promise<boolean | string> | boolean | string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type { IApiaApiConsoleConfig, IApiaApiRequestConfig, TApiaApiResult, TColors, TSetModalProps };
|
|
39
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apia/api",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.10",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"author": "Alexis Leite <alexisleite@live.com>",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"libWatch": "rollup --watch --config ../../config/rollup.common.mjs --environment MODE:development,ENTRY:index.ts,WATCH:true"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@apia/components": "^2.0.
|
|
16
|
+
"@apia/components": "^2.0.10",
|
|
17
17
|
"@apia/notifications": "^2.0.8",
|
|
18
18
|
"@apia/session": "^2.0.8",
|
|
19
19
|
"@apia/theme": "^2.0.8",
|
|
20
20
|
"@apia/util": "^2.0.8",
|
|
21
|
-
"@apia/validations": "^2.0.
|
|
21
|
+
"@apia/validations": "^2.0.10",
|
|
22
22
|
"axios": "^1.3.4"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"access": "public",
|
|
38
38
|
"registry": "https://registry.npmjs.org/"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "7c24cfee81e9960f174af5ede68e8f9f514db1d9"
|
|
41
41
|
}
|