@vulog/aima-config 1.1.91 → 1.1.92

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
@@ -73,6 +73,6 @@ declare const getLabels: (client: Client) => Promise<Label[]>;
73
73
  declare const addLabel: (client: Client, name: string) => Promise<void>;
74
74
  declare const removeLabel: (client: Client, labelId: number, cascade?: boolean) => Promise<void>;
75
75
 
76
- declare const getPaymentParameters: (client: Client, serviceId?: string, modelId?: string) => Promise<PaymentParameters[] | null>;
76
+ declare const getPaymentParameters: (client: Client, serviceId?: string, modelId?: string, strict?: string) => Promise<PaymentParameters[] | null>;
77
77
 
78
78
  export { type City, type FleetConf, type Label, type PaymentParameters, type Service, addLabel, getCities, getCitiesAllFranchises, getFleetConf, getLabels, getPaymentParameters, getServices, getServicesAllFranchises, removeLabel };
package/dist/index.d.ts CHANGED
@@ -73,6 +73,6 @@ declare const getLabels: (client: Client) => Promise<Label[]>;
73
73
  declare const addLabel: (client: Client, name: string) => Promise<void>;
74
74
  declare const removeLabel: (client: Client, labelId: number, cascade?: boolean) => Promise<void>;
75
75
 
76
- declare const getPaymentParameters: (client: Client, serviceId?: string, modelId?: string) => Promise<PaymentParameters[] | null>;
76
+ declare const getPaymentParameters: (client: Client, serviceId?: string, modelId?: string, strict?: string) => Promise<PaymentParameters[] | null>;
77
77
 
78
78
  export { type City, type FleetConf, type Label, type PaymentParameters, type Service, addLabel, getCities, getCitiesAllFranchises, getFleetConf, getLabels, getPaymentParameters, getServices, getServicesAllFranchises, removeLabel };
package/dist/index.js CHANGED
@@ -94,9 +94,10 @@ var removeLabel = async (client, labelId, cascade = false) => {
94
94
  var import_zod2 = require("zod");
95
95
  var schema = import_zod2.z.object({
96
96
  serviceId: import_zod2.z.string().uuid().optional(),
97
- modelId: import_zod2.z.string().optional()
97
+ modelId: import_zod2.z.string().optional(),
98
+ strict: import_zod2.z.enum(["true", "false"]).optional()
98
99
  });
99
- var getPaymentParameters = async (client, serviceId, modelId) => {
100
+ var getPaymentParameters = async (client, serviceId, modelId, strict) => {
100
101
  const validated = schema.safeParse({ serviceId, modelId });
101
102
  if (!validated.success) {
102
103
  throw new TypeError("Invalid parameters", {
@@ -105,7 +106,8 @@ var getPaymentParameters = async (client, serviceId, modelId) => {
105
106
  }
106
107
  const url = `/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/payment/parameters?${new URLSearchParams({
107
108
  ...serviceId ? { serviceId } : {},
108
- ...modelId ? { modelId } : {}
109
+ ...modelId ? { modelId } : {},
110
+ ...strict ? { strict } : {}
109
111
  }).toString()}`;
110
112
  return client.get(url).then(({ data }) => data);
111
113
  };
package/dist/index.mjs CHANGED
@@ -60,9 +60,10 @@ var removeLabel = async (client, labelId, cascade = false) => {
60
60
  import { z as z2 } from "zod";
61
61
  var schema = z2.object({
62
62
  serviceId: z2.string().uuid().optional(),
63
- modelId: z2.string().optional()
63
+ modelId: z2.string().optional(),
64
+ strict: z2.enum(["true", "false"]).optional()
64
65
  });
65
- var getPaymentParameters = async (client, serviceId, modelId) => {
66
+ var getPaymentParameters = async (client, serviceId, modelId, strict) => {
66
67
  const validated = schema.safeParse({ serviceId, modelId });
67
68
  if (!validated.success) {
68
69
  throw new TypeError("Invalid parameters", {
@@ -71,7 +72,8 @@ var getPaymentParameters = async (client, serviceId, modelId) => {
71
72
  }
72
73
  const url = `/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/payment/parameters?${new URLSearchParams({
73
74
  ...serviceId ? { serviceId } : {},
74
- ...modelId ? { modelId } : {}
75
+ ...modelId ? { modelId } : {},
76
+ ...strict ? { strict } : {}
75
77
  }).toString()}`;
76
78
  return client.get(url).then(({ data }) => data);
77
79
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vulog/aima-config",
3
- "version": "1.1.91",
3
+ "version": "1.1.92",
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": "MIT",
21
21
  "dependencies": {
22
- "@vulog/aima-client": "1.1.91",
23
- "@vulog/aima-core": "1.1.91"
22
+ "@vulog/aima-client": "1.1.92",
23
+ "@vulog/aima-core": "1.1.92"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "zod": "^3.25.76"
@@ -6,12 +6,14 @@ import { PaymentParameters } from './types';
6
6
  const schema = z.object({
7
7
  serviceId: z.string().uuid().optional(),
8
8
  modelId: z.string().optional(),
9
+ strict: z.enum(['true', 'false']).optional(),
9
10
  });
10
11
 
11
12
  export const getPaymentParameters = async (
12
13
  client: Client,
13
14
  serviceId?: string,
14
- modelId?: string
15
+ modelId?: string,
16
+ strict?: string
15
17
  ): Promise<PaymentParameters[] | null> => {
16
18
  const validated = schema.safeParse({ serviceId, modelId });
17
19
  if (!validated.success) {
@@ -23,6 +25,7 @@ export const getPaymentParameters = async (
23
25
  const url = `/boapi/proxy/user/fleets/${client.clientOptions.fleetId}/payment/parameters?${new URLSearchParams({
24
26
  ...(serviceId ? { serviceId } : {}),
25
27
  ...(modelId ? { modelId } : {}),
28
+ ...(strict ? { strict } : {}),
26
29
  }).toString()}`;
27
30
 
28
31
  return client.get<PaymentParameters[]>(url).then(({ data }) => data);