@trackunit/iris-app-runtime-core-api 1.11.6 → 1.11.8
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/index.cjs.js +1 -1
- package/index.esm.js +1 -1
- package/package.json +3 -3
- package/src/ChildConnector.d.ts +2 -2
- package/src/RestRuntime.d.ts +5 -5
- package/src/TokenRuntime.d.ts +2 -2
- package/src/types.d.ts +1 -1
package/index.cjs.js
CHANGED
|
@@ -64,7 +64,7 @@ exports.AssetSortByProperty = void 0;
|
|
|
64
64
|
AssetSortByProperty["ContractItemOnRentDate"] = "CONTRACT_ITEM_ON_RENT_DATE";
|
|
65
65
|
AssetSortByProperty["ContractItemOffRentDate"] = "CONTRACT_ITEM_OFF_RENT_DATE";
|
|
66
66
|
})(exports.AssetSortByProperty || (exports.AssetSortByProperty = {}));
|
|
67
|
-
// The type [
|
|
67
|
+
// The type [KeySortProperty in AssetSortByProperty] will ensure that ALL keys are present
|
|
68
68
|
const stringToEnum = {
|
|
69
69
|
ACTIVITY: exports.AssetSortByProperty.Activity,
|
|
70
70
|
BRAND: exports.AssetSortByProperty.Brand,
|
package/index.esm.js
CHANGED
|
@@ -62,7 +62,7 @@ var AssetSortByProperty;
|
|
|
62
62
|
AssetSortByProperty["ContractItemOnRentDate"] = "CONTRACT_ITEM_ON_RENT_DATE";
|
|
63
63
|
AssetSortByProperty["ContractItemOffRentDate"] = "CONTRACT_ITEM_OFF_RENT_DATE";
|
|
64
64
|
})(AssetSortByProperty || (AssetSortByProperty = {}));
|
|
65
|
-
// The type [
|
|
65
|
+
// The type [KeySortProperty in AssetSortByProperty] will ensure that ALL keys are present
|
|
66
66
|
const stringToEnum = {
|
|
67
67
|
ACTIVITY: AssetSortByProperty.Activity,
|
|
68
68
|
BRAND: AssetSortByProperty.Brand,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/iris-app-runtime-core-api",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.8",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
11
|
-
"@trackunit/shared-utils": "1.13.
|
|
12
|
-
"@trackunit/geo-json-utils": "1.11.
|
|
11
|
+
"@trackunit/shared-utils": "1.13.8",
|
|
12
|
+
"@trackunit/geo-json-utils": "1.11.8"
|
|
13
13
|
},
|
|
14
14
|
"module": "./index.esm.js",
|
|
15
15
|
"main": "./index.cjs.js",
|
package/src/ChildConnector.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AssetSortingState } from "./AssetSortingRuntime";
|
|
2
2
|
import { FilterBarValues } from "./FilterBarRuntime";
|
|
3
3
|
import { TemporalPeriod, TimeRange } from "./TimeRangeRuntime";
|
|
4
|
-
import {
|
|
4
|
+
import { TokenContext } from "./TokenRuntime";
|
|
5
5
|
export interface ChildConnectorApi {
|
|
6
6
|
/**
|
|
7
7
|
* Gets called when the token changes.
|
|
@@ -9,7 +9,7 @@ export interface ChildConnectorApi {
|
|
|
9
9
|
* @param token new token to use
|
|
10
10
|
* @returns
|
|
11
11
|
*/
|
|
12
|
-
onTokenChanged: (token:
|
|
12
|
+
onTokenChanged: (token: TokenContext) => void;
|
|
13
13
|
/**
|
|
14
14
|
* Gets called when the time range changes.
|
|
15
15
|
*
|
package/src/RestRuntime.d.ts
CHANGED
|
@@ -8,15 +8,15 @@ export declare enum BodyType {
|
|
|
8
8
|
Json = 0,
|
|
9
9
|
FormData = 1
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
12
|
-
request: <
|
|
11
|
+
export interface RestApiClientContract {
|
|
12
|
+
request: <TResponse, TError>(path: string, method: string, requestParams?: RequestParams, body?: unknown, bodyType?: BodyType, secureByDefault?: boolean) => Promise<HttpResponse<TResponse, TError>>;
|
|
13
13
|
apiHost: string;
|
|
14
14
|
}
|
|
15
15
|
export type RequestQueryParamsType = Record<string | number, any>;
|
|
16
16
|
type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
|
|
17
|
-
export interface HttpResponse<
|
|
18
|
-
data?:
|
|
19
|
-
error?:
|
|
17
|
+
export interface HttpResponse<TData, TError> {
|
|
18
|
+
data?: TData;
|
|
19
|
+
error?: TError;
|
|
20
20
|
headers: {
|
|
21
21
|
[key: string]: string;
|
|
22
22
|
};
|
package/src/TokenRuntime.d.ts
CHANGED
package/src/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type PromisifyMethod<TNonPromise> = TNonPromise extends (...args: infer U) => infer V ? (...args: U) => Promise<V> : TNonPromise;
|
|
2
2
|
export type PromisifyObject<TNonPromiseObject> = {
|
|
3
|
-
[
|
|
3
|
+
[KeyProperty in keyof TNonPromiseObject]: PromisifyMethod<TNonPromiseObject[KeyProperty]>;
|
|
4
4
|
};
|