@vulog/aima-mobility-plans 1.1.61 → 1.1.62

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
@@ -49,7 +49,7 @@ type UnsubscribeResponse = {
49
49
  invoiceIds: string[];
50
50
  status: 'ACTIVE' | 'PAYMENT_PENDING' | 'ACTIVATION_PENDING';
51
51
  };
52
- declare const unsubscribe: (client: Client, entityId: string, profileId: string) => Promise<UnsubscribeResponse>;
52
+ declare const unsubscribe: (client: Client, subscriptionId: string, profileId: string) => Promise<UnsubscribeResponse>;
53
53
 
54
54
  type SubscribeResponse = {
55
55
  id: string;
package/dist/index.d.ts CHANGED
@@ -49,7 +49,7 @@ type UnsubscribeResponse = {
49
49
  invoiceIds: string[];
50
50
  status: 'ACTIVE' | 'PAYMENT_PENDING' | 'ACTIVATION_PENDING';
51
51
  };
52
- declare const unsubscribe: (client: Client, entityId: string, profileId: string) => Promise<UnsubscribeResponse>;
52
+ declare const unsubscribe: (client: Client, subscriptionId: string, profileId: string) => Promise<UnsubscribeResponse>;
53
53
 
54
54
  type SubscribeResponse = {
55
55
  id: string;
package/dist/index.js CHANGED
@@ -63,15 +63,15 @@ var schema3 = import_zod3.z.object({
63
63
  entityId: import_zod3.z.string().uuid(),
64
64
  profileId: import_zod3.z.string().uuid()
65
65
  });
66
- var unsubscribe = async (client, entityId, profileId) => {
67
- const result = schema3.safeParse({ entityId, profileId });
66
+ var unsubscribe = async (client, subscriptionId, profileId) => {
67
+ const result = schema3.safeParse({ subscriptionId, profileId });
68
68
  if (!result.success) {
69
69
  throw new TypeError("Invalid args", {
70
70
  cause: result.error.issues
71
71
  });
72
72
  }
73
73
  return client.post(
74
- `/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/subscriptions/${entityId}/unsubscribe`,
74
+ `/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/subscriptions/${subscriptionId}/unsubscribe`,
75
75
  {
76
76
  profileId
77
77
  }
package/dist/index.mjs CHANGED
@@ -34,15 +34,15 @@ var schema3 = z3.object({
34
34
  entityId: z3.string().uuid(),
35
35
  profileId: z3.string().uuid()
36
36
  });
37
- var unsubscribe = async (client, entityId, profileId) => {
38
- const result = schema3.safeParse({ entityId, profileId });
37
+ var unsubscribe = async (client, subscriptionId, profileId) => {
38
+ const result = schema3.safeParse({ subscriptionId, profileId });
39
39
  if (!result.success) {
40
40
  throw new TypeError("Invalid args", {
41
41
  cause: result.error.issues
42
42
  });
43
43
  }
44
44
  return client.post(
45
- `/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/subscriptions/${entityId}/unsubscribe`,
45
+ `/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/subscriptions/${subscriptionId}/unsubscribe`,
46
46
  {
47
47
  profileId
48
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vulog/aima-mobility-plans",
3
- "version": "1.1.61",
3
+ "version": "1.1.62",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -20,8 +20,8 @@
20
20
  "author": "Vulog",
21
21
  "license": "ISC",
22
22
  "dependencies": {
23
- "@vulog/aima-client": "1.1.61",
24
- "@vulog/aima-core": "1.1.61"
23
+ "@vulog/aima-client": "1.1.62",
24
+ "@vulog/aima-core": "1.1.62"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "zod": "^3.24.2"
@@ -22,10 +22,10 @@ type UnsubscribeResponse = {
22
22
 
23
23
  export const unsubscribe = async (
24
24
  client: Client,
25
- entityId: string,
25
+ subscriptionId: string,
26
26
  profileId: string
27
27
  ): Promise<UnsubscribeResponse> => {
28
- const result = schema.safeParse({ entityId, profileId });
28
+ const result = schema.safeParse({ subscriptionId, profileId });
29
29
  if (!result.success) {
30
30
  throw new TypeError('Invalid args', {
31
31
  cause: result.error.issues,
@@ -34,7 +34,7 @@ export const unsubscribe = async (
34
34
  // https://java-sta.vulog.com/boapi/proxy/user/fleets/LEO-CAMTR/subscriptions/c360b6d9-659f-4547-8840-58e39a753b0a/unsubscribe
35
35
  return client
36
36
  .post<UnsubscribeResponse>(
37
- `/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/subscriptions/${entityId}/unsubscribe`,
37
+ `/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/subscriptions/${subscriptionId}/unsubscribe`,
38
38
  {
39
39
  profileId,
40
40
  }