@vulog/aima-config 1.0.0 → 1.0.1
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 +4 -1
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +7 -0
- package/dist/index.mjs +6 -0
- package/package.json +1 -1
- package/src/getFleetConf.ts +12 -0
- package/src/index.ts +2 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ npm i @vulog/aima-client @vulog/aima-core @vulog/aima-config
|
|
|
6
6
|
|
|
7
7
|
```javascript
|
|
8
8
|
import { getClient } from '@vulog/aima-client';
|
|
9
|
-
import {
|
|
9
|
+
import { getCities, getServices } from '@vulog/aima-config';
|
|
10
10
|
|
|
11
11
|
const client = getClient({
|
|
12
12
|
apiKey: '...',
|
|
@@ -16,4 +16,7 @@ const client = getClient({
|
|
|
16
16
|
fleetId: '...',
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
+
const cities = await getCities(client);
|
|
20
|
+
const services = await getServices(client);
|
|
21
|
+
|
|
19
22
|
```
|
package/dist/index.d.mts
CHANGED
|
@@ -38,4 +38,10 @@ type Service = {
|
|
|
38
38
|
};
|
|
39
39
|
declare const getServices: (client: Client) => Promise<Service[]>;
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
type FleetConf = {
|
|
42
|
+
triggerSubscriptionPaymentInHours: number;
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
};
|
|
45
|
+
declare const getFleetConf: (client: Client) => Promise<FleetConf>;
|
|
46
|
+
|
|
47
|
+
export { type City, type FleetConf, type Service, getCities, getFleetConf, getServices };
|
package/dist/index.d.ts
CHANGED
|
@@ -38,4 +38,10 @@ type Service = {
|
|
|
38
38
|
};
|
|
39
39
|
declare const getServices: (client: Client) => Promise<Service[]>;
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
type FleetConf = {
|
|
42
|
+
triggerSubscriptionPaymentInHours: number;
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
};
|
|
45
|
+
declare const getFleetConf: (client: Client) => Promise<FleetConf>;
|
|
46
|
+
|
|
47
|
+
export { type City, type FleetConf, type Service, getCities, getFleetConf, getServices };
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
23
|
getCities: () => getCities,
|
|
24
|
+
getFleetConf: () => getFleetConf,
|
|
24
25
|
getServices: () => getServices
|
|
25
26
|
});
|
|
26
27
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -38,8 +39,14 @@ var getServices = async (client) => {
|
|
|
38
39
|
({ data }) => data.filter((city) => city.fleetId === client.clientOptions.fleetId).map(({ fleetId, ...service }) => service)
|
|
39
40
|
);
|
|
40
41
|
};
|
|
42
|
+
|
|
43
|
+
// src/getFleetConf.ts
|
|
44
|
+
var getFleetConf = async (client) => {
|
|
45
|
+
return client.get(`/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/conf`).then(({ data }) => data);
|
|
46
|
+
};
|
|
41
47
|
// Annotate the CommonJS export names for ESM import in node:
|
|
42
48
|
0 && (module.exports = {
|
|
43
49
|
getCities,
|
|
50
|
+
getFleetConf,
|
|
44
51
|
getServices
|
|
45
52
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,13 @@ var getServices = async (client) => {
|
|
|
11
11
|
({ data }) => data.filter((city) => city.fleetId === client.clientOptions.fleetId).map(({ fleetId, ...service }) => service)
|
|
12
12
|
);
|
|
13
13
|
};
|
|
14
|
+
|
|
15
|
+
// src/getFleetConf.ts
|
|
16
|
+
var getFleetConf = async (client) => {
|
|
17
|
+
return client.get(`/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/conf`).then(({ data }) => data);
|
|
18
|
+
};
|
|
14
19
|
export {
|
|
15
20
|
getCities,
|
|
21
|
+
getFleetConf,
|
|
16
22
|
getServices
|
|
17
23
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Client } from '@vulog/aima-client';
|
|
2
|
+
|
|
3
|
+
export type FleetConf = {
|
|
4
|
+
triggerSubscriptionPaymentInHours: number;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const getFleetConf = async (client: Client): Promise<FleetConf> => {
|
|
9
|
+
return client
|
|
10
|
+
.get<FleetConf>(`/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/conf`)
|
|
11
|
+
.then(({ data }) => data);
|
|
12
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -2,3 +2,5 @@ export { getCities } from './getCities';
|
|
|
2
2
|
export type { City } from './getCities';
|
|
3
3
|
export { getServices } from './getServices';
|
|
4
4
|
export type { Service } from './getServices';
|
|
5
|
+
export { getFleetConf } from './getFleetConf';
|
|
6
|
+
export type { FleetConf } from './getFleetConf';
|