@vulog/aima-config 1.1.56 → 1.1.57

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/index.d.mts CHANGED
@@ -22,11 +22,6 @@ type City = {
22
22
  zoneId: string;
23
23
  [key: string]: any;
24
24
  };
25
- declare const getCities: (client: Client) => Promise<City[]>;
26
- declare const getCitiesAllFranchises: (client: Client) => Promise<(City & {
27
- fleetId: string;
28
- })[]>;
29
-
30
25
  type Service = {
31
26
  id: string;
32
27
  name: string;
@@ -37,9 +32,14 @@ type Service = {
37
32
  vehicles: string[];
38
33
  stations: string[];
39
34
  pois: string[];
40
- visibility: 'PUBLIC' | 'PRIVATE';
41
35
  [key: string]: any;
42
36
  };
37
+
38
+ declare const getCities: (client: Client) => Promise<City[]>;
39
+ declare const getCitiesAllFranchises: (client: Client) => Promise<(City & {
40
+ fleetId: string;
41
+ })[]>;
42
+
43
43
  declare const getServices: (client: Client) => Promise<Service[]>;
44
44
  declare const getServicesAllFranchises: (client: Client) => Promise<(Service & {
45
45
  fleetId: string;
@@ -47,6 +47,7 @@ declare const getServicesAllFranchises: (client: Client) => Promise<(Service & {
47
47
 
48
48
  type FleetConf = {
49
49
  triggerSubscriptionPaymentInHours: number;
50
+ timeZone: string;
50
51
  [key: string]: any;
51
52
  };
52
53
  declare const getFleetConf: (client: Client) => Promise<FleetConf>;
package/dist/index.d.ts CHANGED
@@ -22,11 +22,6 @@ type City = {
22
22
  zoneId: string;
23
23
  [key: string]: any;
24
24
  };
25
- declare const getCities: (client: Client) => Promise<City[]>;
26
- declare const getCitiesAllFranchises: (client: Client) => Promise<(City & {
27
- fleetId: string;
28
- })[]>;
29
-
30
25
  type Service = {
31
26
  id: string;
32
27
  name: string;
@@ -37,9 +32,14 @@ type Service = {
37
32
  vehicles: string[];
38
33
  stations: string[];
39
34
  pois: string[];
40
- visibility: 'PUBLIC' | 'PRIVATE';
41
35
  [key: string]: any;
42
36
  };
37
+
38
+ declare const getCities: (client: Client) => Promise<City[]>;
39
+ declare const getCitiesAllFranchises: (client: Client) => Promise<(City & {
40
+ fleetId: string;
41
+ })[]>;
42
+
43
43
  declare const getServices: (client: Client) => Promise<Service[]>;
44
44
  declare const getServicesAllFranchises: (client: Client) => Promise<(Service & {
45
45
  fleetId: string;
@@ -47,6 +47,7 @@ declare const getServicesAllFranchises: (client: Client) => Promise<(Service & {
47
47
 
48
48
  type FleetConf = {
49
49
  triggerSubscriptionPaymentInHours: number;
50
+ timeZone: string;
50
51
  [key: string]: any;
51
52
  };
52
53
  declare const getFleetConf: (client: Client) => Promise<FleetConf>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vulog/aima-config",
3
- "version": "1.1.56",
3
+ "version": "1.1.57",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -19,8 +19,8 @@
19
19
  "author": "Vulog",
20
20
  "license": "ISC",
21
21
  "dependencies": {
22
- "@vulog/aima-client": "1.1.56",
23
- "@vulog/aima-core": "1.1.56"
22
+ "@vulog/aima-client": "1.1.57",
23
+ "@vulog/aima-core": "1.1.57"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "zod": "^3.24.2"
package/src/getCities.ts CHANGED
@@ -1,27 +1,6 @@
1
1
  import { Client } from '@vulog/aima-client';
2
2
 
3
- export type City = {
4
- id: string;
5
- name: string;
6
- locale: string;
7
- imagesUrl: string;
8
- tokenIconsUrl?: string;
9
- lat: number;
10
- lon: number;
11
- zoomLevel: number;
12
- radius: number;
13
- termsOfUseUrl: string;
14
- termsOfUseUpdateDatetime: string;
15
- faqUrl: string;
16
- contactPhoneNumber: string;
17
- agreementsDate: string;
18
- timeZone: string;
19
- distanceUnit: string;
20
- contactUrl: string;
21
- services: string[];
22
- zoneId: string;
23
- [key: string]: any;
24
- };
3
+ import { City } from './types';
25
4
 
26
5
  export const getCities = async (client: Client): Promise<City[]> => {
27
6
  return client
@@ -0,0 +1,13 @@
1
+ import { Client } from '@vulog/aima-client';
2
+
3
+ import { City } from './types';
4
+
5
+ export const getCity = async (client: Client, id: string): Promise<City[]> => {
6
+ return client
7
+ .get<
8
+ (City & {
9
+ fleetId: string;
10
+ })[]
11
+ >(`/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/cities/${id}`)
12
+ .then(({ data }) => data);
13
+ };
@@ -2,6 +2,7 @@ import { Client } from '@vulog/aima-client';
2
2
 
3
3
  export type FleetConf = {
4
4
  triggerSubscriptionPaymentInHours: number;
5
+ timeZone: string; // Europe/Berlin",
5
6
  [key: string]: any;
6
7
  };
7
8
 
@@ -0,0 +1,13 @@
1
+ import { Client } from '@vulog/aima-client';
2
+
3
+ import { Service } from './types';
4
+
5
+ export const getService = async (client: Client, id: string): Promise<Service[]> => {
6
+ return client
7
+ .get<
8
+ (Service & {
9
+ fleetId: string;
10
+ })[]
11
+ >(`/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/services${id}`)
12
+ .then(({ data }) => data);
13
+ };
@@ -1,4 +1,4 @@
1
- import { describe, test, expect, vi, beforeEach, afterEach } from 'vitest';
1
+ import { describe, test, expect, vi } from 'vitest';
2
2
  import { Client } from '@vulog/aima-client';
3
3
  import { getServices } from './getServices';
4
4
 
@@ -1,27 +1,6 @@
1
1
  import { Client } from '@vulog/aima-client';
2
2
 
3
- export type Service = {
4
- id: string;
5
- name: string;
6
- status: 'ACTIVE' | 'DISABLED';
7
- type:
8
- | 'FREE_FLOATING'
9
- | 'FREE_FLOATING_STRICT'
10
- | 'SERVICE_TRIP'
11
- | 'BOOKING'
12
- | 'ROUND_TRIP_BOOKING'
13
- | 'BY_PASS_FREE_FLOATING'
14
- | 'BY_PASS_ROUND_TRIP_BOOKING'
15
- | 'SUBSCRIPTION'
16
- | 'SCHEDULED_BOOKING_STATION';
17
- cityId: string;
18
- zones: string[];
19
- vehicles: string[];
20
- stations: string[];
21
- pois: string[];
22
- visibility: 'PUBLIC' | 'PRIVATE';
23
- [key: string]: any;
24
- };
3
+ import { Service } from './types';
25
4
 
26
5
  export const getServices = async (client: Client): Promise<Service[]> => {
27
6
  return client
package/src/index.ts CHANGED
@@ -2,3 +2,4 @@ export * from './getCities';
2
2
  export * from './getServices';
3
3
  export * from './getFleetConf';
4
4
  export * from './label';
5
+ export * from './types';
package/src/types.ts ADDED
@@ -0,0 +1,44 @@
1
+ export type City = {
2
+ id: string;
3
+ name: string;
4
+ locale: string;
5
+ imagesUrl: string;
6
+ tokenIconsUrl?: string;
7
+ lat: number;
8
+ lon: number;
9
+ zoomLevel: number;
10
+ radius: number;
11
+ termsOfUseUrl: string;
12
+ termsOfUseUpdateDatetime: string;
13
+ faqUrl: string;
14
+ contactPhoneNumber: string;
15
+ agreementsDate: string;
16
+ timeZone: string;
17
+ distanceUnit: string;
18
+ contactUrl: string;
19
+ services: string[];
20
+ zoneId: string;
21
+ [key: string]: any;
22
+ };
23
+
24
+ export type Service = {
25
+ id: string;
26
+ name: string;
27
+ status: 'ACTIVE' | 'DISABLED';
28
+ type:
29
+ | 'FREE_FLOATING'
30
+ | 'FREE_FLOATING_STRICT'
31
+ | 'SERVICE_TRIP'
32
+ | 'BOOKING'
33
+ | 'ROUND_TRIP_BOOKING'
34
+ | 'BY_PASS_FREE_FLOATING'
35
+ | 'BY_PASS_ROUND_TRIP_BOOKING'
36
+ | 'SUBSCRIPTION'
37
+ | 'SCHEDULED_BOOKING_STATION';
38
+ cityId: string;
39
+ zones: string[];
40
+ vehicles: string[];
41
+ stations: string[];
42
+ pois: string[];
43
+ [key: string]: any;
44
+ };