@vulog/aima-booking 1.2.47 → 1.2.48

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.cjs CHANGED
@@ -396,7 +396,7 @@ const schema$6 = zod.z.object({ userId: zod.z.string().trim().min(1).uuid() });
396
396
  const getBookingRequestsByUserId = async (client, userId) => {
397
397
  const result = schema$6.safeParse({ userId });
398
398
  if (!result.success) throw new TypeError("Invalid userId", { cause: result.error.issues });
399
- return client.get(`/user/scheduledBooking/fleets/${client.clientOptions.fleetId}/bookingrequests/users/${userId}`).then(({ data }) => data).catch((error) => {
399
+ return client.get(`/boapi/proxy/user/scheduledBooking/fleets/${client.clientOptions.fleetId}/bookingrequests/users/${userId}`).then(({ data }) => data).catch((error) => {
400
400
  if (error.formattedError?.status === 404) return [];
401
401
  throw error;
402
402
  });
package/dist/index.d.cts CHANGED
@@ -459,8 +459,8 @@ declare const getAvailableVehicles: (client: Client, stationId: string, startDat
459
459
  //#region src/getStations.d.ts
460
460
  declare const IncludeSchema$1: z.ZodEnum<{
461
461
  INFO: "INFO";
462
- OPEN_HOUR: "OPEN_HOUR";
463
462
  SERVICES: "SERVICES";
463
+ OPEN_HOUR: "OPEN_HOUR";
464
464
  }>;
465
465
  type Include = z.infer<typeof IncludeSchema$1>;
466
466
  declare const getStations: (client: Client, includes?: Include[]) => Promise<Station[]>;
package/dist/index.d.mts CHANGED
@@ -459,8 +459,8 @@ declare const getAvailableVehicles: (client: Client, stationId: string, startDat
459
459
  //#region src/getStations.d.ts
460
460
  declare const IncludeSchema$1: z.ZodEnum<{
461
461
  INFO: "INFO";
462
- OPEN_HOUR: "OPEN_HOUR";
463
462
  SERVICES: "SERVICES";
463
+ OPEN_HOUR: "OPEN_HOUR";
464
464
  }>;
465
465
  type Include = z.infer<typeof IncludeSchema$1>;
466
466
  declare const getStations: (client: Client, includes?: Include[]) => Promise<Station[]>;
package/dist/index.mjs CHANGED
@@ -395,7 +395,7 @@ const schema$6 = z.object({ userId: z.string().trim().min(1).uuid() });
395
395
  const getBookingRequestsByUserId = async (client, userId) => {
396
396
  const result = schema$6.safeParse({ userId });
397
397
  if (!result.success) throw new TypeError("Invalid userId", { cause: result.error.issues });
398
- return client.get(`/user/scheduledBooking/fleets/${client.clientOptions.fleetId}/bookingrequests/users/${userId}`).then(({ data }) => data).catch((error) => {
398
+ return client.get(`/boapi/proxy/user/scheduledBooking/fleets/${client.clientOptions.fleetId}/bookingrequests/users/${userId}`).then(({ data }) => data).catch((error) => {
399
399
  if (error.formattedError?.status === 404) return [];
400
400
  throw error;
401
401
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vulog/aima-booking",
3
3
  "type": "module",
4
- "version": "1.2.47",
4
+ "version": "1.2.48",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.cts",
@@ -32,8 +32,8 @@
32
32
  "author": "Vulog",
33
33
  "license": "MIT",
34
34
  "dependencies": {
35
- "@vulog/aima-client": "1.2.47",
36
- "@vulog/aima-core": "1.2.47"
35
+ "@vulog/aima-client": "1.2.48",
36
+ "@vulog/aima-core": "1.2.48"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "es-toolkit": "^1.45.1",
@@ -16,7 +16,7 @@ export const getBookingRequestsByUserId = async (client: Client, userId: string)
16
16
  }
17
17
  return client
18
18
  .get<BookingRequest[]>(
19
- `/user/scheduledBooking/fleets/${client.clientOptions.fleetId}/bookingrequests/users/${userId}`
19
+ `/boapi/proxy/user/scheduledBooking/fleets/${client.clientOptions.fleetId}/bookingrequests/users/${userId}`
20
20
  )
21
21
  .then(({ data }) => data)
22
22
  .catch((error) => {