@vulog/aima-config 1.1.1 → 1.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vulog/aima-config",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -32,8 +32,8 @@
32
32
  "vitest": "^2.1.8"
33
33
  },
34
34
  "peerDependencies": {
35
- "@vulog/aima-client": "^1.0.0",
36
- "@vulog/aima-core": "^1.0.0",
35
+ "@vulog/aima-client": "1.1.3",
36
+ "@vulog/aima-core": "1.1.3",
37
37
  "zod": "^3.23.8"
38
38
  },
39
39
  "description": ""
package/src/getCities.ts CHANGED
@@ -36,3 +36,13 @@ export const getCities = async (client: Client): Promise<City[]> => {
36
36
  .map(({ fleetId, ...city }) => city as City)
37
37
  );
38
38
  };
39
+
40
+ export const getCitiesAllFranchises = async (client: Client): Promise<City[]> => {
41
+ return client
42
+ .get<
43
+ (City & {
44
+ fleetId: string;
45
+ })[]
46
+ >(`/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/cities`)
47
+ .then(({ data }) => data.map(({ fleetId, ...city }) => city as City));
48
+ };
@@ -35,3 +35,13 @@ export const getServices = async (client: Client): Promise<Service[]> => {
35
35
  .map(({ fleetId, ...service }) => service as Service)
36
36
  );
37
37
  };
38
+
39
+ export const getServicesAllFranchises = async (client: Client): Promise<Service[]> => {
40
+ return client
41
+ .get<
42
+ (Service & {
43
+ fleetId: string;
44
+ })[]
45
+ >(`/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/services`)
46
+ .then(({ data }) => data.map(({ fleetId, ...service }) => service as Service));
47
+ };