@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.
@@ -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.9",
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.9",
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.9",
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": "0fec582924d14ada0f317defb5e024b1a8f96c4d"
40
+ "gitHead": "7c24cfee81e9960f174af5ede68e8f9f514db1d9"
41
41
  }