@vulog/aima-business 1.2.39 → 1.2.41
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 +266 -87
- package/dist/index.d.cts +267 -49
- package/dist/index.d.mts +267 -49
- package/dist/index.mjs +266 -87
- package/package.json +4 -4
- package/src/addBusinessCredit.ts +2 -0
- package/src/bulkAddBusinessUsers.ts +22 -17
- package/src/chargeBusinessProduct.ts +8 -0
- package/src/createBusiness.ts +45 -3
- package/src/createBusinessCostCenter.test.ts +15 -5
- package/src/createBusinessCostCenter.ts +3 -0
- package/src/getBusinessInviteLink.ts +30 -3
- package/src/getBusinessInvoices.test.ts +55 -6
- package/src/getBusinessInvoices.ts +28 -9
- package/src/getBusinessUsers.test.ts +52 -4
- package/src/getBusinessUsers.ts +23 -9
- package/src/getBusinessWallet.test.ts +40 -10
- package/src/getBusinessWallet.ts +33 -7
- package/src/getBusinesses.test.ts +76 -28
- package/src/getBusinesses.ts +31 -9
- package/src/getEntityProducts.ts +46 -7
- package/src/getEntityTrips.ts +49 -6
- package/src/getEntityTripsCost.ts +44 -9
- package/src/getInvoiceRefundNote.ts +18 -6
- package/src/getOngoingTrips.test.ts +54 -12
- package/src/getOngoingTrips.ts +38 -5
- package/src/inviteBusinessUser.ts +18 -7
- package/src/searchBusinessUsersByName.ts +1 -1
- package/src/searchBusinessUsersGlobal.ts +3 -3
- package/src/sendBusinessIban.ts +2 -0
- package/src/setInvoiceExternalPayment.ts +6 -4
- package/src/types.ts +181 -25
- package/src/updateBusiness.ts +45 -3
- package/src/updateBusinessCostCenter.ts +2 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,44 +1,92 @@
|
|
|
1
1
|
import { Client } from "@vulog/aima-client";
|
|
2
2
|
import { PaginableOptions, PaginableResponse } from "@vulog/aima-core";
|
|
3
|
+
import { z } from "zod";
|
|
3
4
|
|
|
4
5
|
//#region src/addBusinessCredit.d.ts
|
|
5
6
|
type AddBusinessCreditBody = {
|
|
6
7
|
amount: number;
|
|
8
|
+
expirationDate: string;
|
|
7
9
|
};
|
|
8
10
|
declare const addBusinessCredit: (client: Client, businessId: string, body: AddBusinessCreditBody) => Promise<void>;
|
|
9
11
|
//#endregion
|
|
10
12
|
//#region src/types.d.ts
|
|
11
|
-
/**
|
|
13
|
+
/** Spring Page response wrapper used by the business API */
|
|
14
|
+
type SpringPage<T> = {
|
|
15
|
+
content: T[];
|
|
16
|
+
totalElements: number;
|
|
17
|
+
totalPages: number;
|
|
18
|
+
size: number;
|
|
19
|
+
number: number;
|
|
20
|
+
first: boolean;
|
|
21
|
+
last: boolean;
|
|
22
|
+
numberOfElements: number;
|
|
23
|
+
empty: boolean;
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
};
|
|
26
|
+
/** Represents a business entity (BusinessWSDTO) */
|
|
12
27
|
type Business = {
|
|
13
|
-
/** Unique identifier */id: string; /**
|
|
14
|
-
|
|
15
|
-
|
|
28
|
+
/** Unique identifier */id: string; /** Fleet identifier */
|
|
29
|
+
fleetId: string; /** Business name */
|
|
30
|
+
name: string; /** Legal name */
|
|
31
|
+
legalName?: string; /** Phone number */
|
|
32
|
+
phoneNumber?: string; /** Fax number */
|
|
33
|
+
faxNumber?: string; /** Email address */
|
|
34
|
+
email?: string; /** VAT number */
|
|
35
|
+
vat?: string; /** EIN number */
|
|
36
|
+
ein?: string; /** Registration URL */
|
|
37
|
+
registrationUrl?: string; /** Comment */
|
|
38
|
+
comment?: string; /** Payment type */
|
|
39
|
+
paymentType?: string; /** Locale */
|
|
40
|
+
locale?: string; /** Invoice frequency */
|
|
41
|
+
invoiceFrequency?: string; /** Business status */
|
|
42
|
+
status?: string; /** Business type */
|
|
43
|
+
type?: string; /** Entity name */
|
|
44
|
+
entityName?: string; /** Whether trip notes are mandatory */
|
|
45
|
+
mandatoryTripNotes?: boolean; /** Whether this is a master entity */
|
|
46
|
+
masterEntity?: boolean; /** Next iteration date */
|
|
47
|
+
nextIteration?: string; /** Creation date */
|
|
48
|
+
creationDate?: string; /** Update date */
|
|
49
|
+
updateDate?: string;
|
|
16
50
|
[key: string]: any;
|
|
17
51
|
};
|
|
18
|
-
/** Represents a contact within a business */
|
|
52
|
+
/** Represents a contact within a business (ContactsDTO) */
|
|
19
53
|
type BusinessContact = {
|
|
20
|
-
/** Contact identifier */id: string; /** Contact
|
|
21
|
-
name: string; /** Contact email */
|
|
54
|
+
/** Contact identifier */id: string; /** Contact email */
|
|
22
55
|
email: string;
|
|
23
56
|
[key: string]: any;
|
|
24
57
|
};
|
|
25
|
-
/** Represents a cost center within a business */
|
|
58
|
+
/** Represents a cost center within a business (CostCenterDTO) */
|
|
26
59
|
type CostCenter = {
|
|
27
60
|
/** Unique identifier */id: string; /** Cost center name */
|
|
28
|
-
name: string; /**
|
|
29
|
-
|
|
61
|
+
name: string; /** Cost center value */
|
|
62
|
+
value: string;
|
|
30
63
|
[key: string]: any;
|
|
31
64
|
};
|
|
32
|
-
/** Represents payment details for a business */
|
|
65
|
+
/** Represents payment details for a business (PaymentBusinessDTO) */
|
|
33
66
|
type BusinessPaymentDetails = {
|
|
34
|
-
/**
|
|
67
|
+
/** Entity identifier */entityId?: string; /** Fleet identifier */
|
|
68
|
+
fleetId?: string; /** Holder name */
|
|
69
|
+
holderName?: string; /** Card type */
|
|
70
|
+
cardType?: string; /** Card summary (last digits) */
|
|
71
|
+
cardSummary?: string; /** Expiry date */
|
|
72
|
+
expiryDate?: string; /** Payment method type */
|
|
73
|
+
paymentMethod?: string; /** Mean of payment status */
|
|
74
|
+
mopStatus?: string; /** PSP name */
|
|
75
|
+
pspName?: string; /** IBAN */
|
|
76
|
+
iban?: string;
|
|
35
77
|
[key: string]: any;
|
|
36
78
|
};
|
|
37
|
-
/** Represents a user linked to a business */
|
|
79
|
+
/** Represents a user linked to a business (UserBusinessDTO) */
|
|
38
80
|
type BusinessUser = {
|
|
39
|
-
/** User identifier */
|
|
40
|
-
|
|
41
|
-
|
|
81
|
+
/** User identifier */id: string; /** First name */
|
|
82
|
+
firstName?: string; /** Last name */
|
|
83
|
+
lastName?: string; /** Registration date */
|
|
84
|
+
registrationDate?: string; /** Username */
|
|
85
|
+
userName?: string; /** Account status */
|
|
86
|
+
accountStatus?: string; /** Whether user is a delegated admin */
|
|
87
|
+
delegatedAdmin?: boolean; /** Whether user is a delegated admin (alias) */
|
|
88
|
+
isDelegatedAdmin?: boolean; /** Full name */
|
|
89
|
+
fullName?: string;
|
|
42
90
|
[key: string]: any;
|
|
43
91
|
};
|
|
44
92
|
/** Represents an invitation link for a business */
|
|
@@ -73,26 +121,47 @@ type StripeConfig = {
|
|
|
73
121
|
/** Stripe publishable key */publishableKey: string;
|
|
74
122
|
[key: string]: any;
|
|
75
123
|
};
|
|
76
|
-
/** Represents a business invoice */
|
|
124
|
+
/** Represents a business invoice (InvoiceCumulativeBusinessDTO) */
|
|
77
125
|
type BusinessInvoice = {
|
|
78
|
-
/** Invoice identifier */id: string; /** Invoice
|
|
79
|
-
|
|
80
|
-
|
|
126
|
+
/** Invoice identifier */id: string; /** Invoice sequence number */
|
|
127
|
+
sequence?: number; /** Invoice date */
|
|
128
|
+
invoiceDate?: string; /** Fleet identifier */
|
|
129
|
+
fleetId?: string; /** Invoice year */
|
|
130
|
+
invoiceYear?: number; /** Invoice status */
|
|
131
|
+
invoicesStatus?: string; /** Invoice amount */
|
|
132
|
+
amount?: number; /** Currency */
|
|
133
|
+
currency?: string; /** Entity identifier */
|
|
134
|
+
entityId?: string; /** Number of payment attempts */
|
|
135
|
+
attempts?: number; /** PSP name */
|
|
136
|
+
pspName?: string; /** PSP reference */
|
|
137
|
+
pspReference?: string; /** Invoice type */
|
|
138
|
+
type?: string; /** Invoice number */
|
|
139
|
+
invoiceNumber?: string;
|
|
81
140
|
[key: string]: any;
|
|
82
141
|
};
|
|
83
142
|
/** Represents the refund note for an invoice */
|
|
84
143
|
type InvoiceRefundNote = {
|
|
85
144
|
[key: string]: any;
|
|
86
145
|
};
|
|
87
|
-
/** Represents the refundable amount for an invoice */
|
|
146
|
+
/** Represents the refundable amount for an invoice (InvoiceRefundDTO) */
|
|
88
147
|
type InvoiceRefundableAmount = {
|
|
89
|
-
/** Invoice identifier */invoiceId: string; /**
|
|
90
|
-
|
|
148
|
+
/** Invoice identifier */invoiceId: string; /** Fleet identifier */
|
|
149
|
+
fleetId?: string; /** Refundable amount */
|
|
150
|
+
refundableAmount: number; /** Currency */
|
|
151
|
+
currency?: string;
|
|
91
152
|
[key: string]: any;
|
|
92
153
|
};
|
|
93
|
-
/** Represents a business trip */
|
|
154
|
+
/** Represents a business trip (OngoingTripDTO) */
|
|
94
155
|
type BusinessTrip = {
|
|
95
|
-
/** Trip identifier */
|
|
156
|
+
/** Identifier */id?: string; /** Trip identifier */
|
|
157
|
+
tripId?: string; /** User identifier */
|
|
158
|
+
userId?: string; /** Profile identifier */
|
|
159
|
+
profileId?: string; /** Theoretical start date */
|
|
160
|
+
theorStartDate?: string; /** Theoretical end date */
|
|
161
|
+
theorEndDate?: string; /** Name */
|
|
162
|
+
name?: string; /** Vehicle plate */
|
|
163
|
+
plate?: string; /** Booking date */
|
|
164
|
+
booking_date?: string;
|
|
96
165
|
[key: string]: any;
|
|
97
166
|
};
|
|
98
167
|
/** Represents a note on a trip */
|
|
@@ -101,10 +170,17 @@ type TripNote = {
|
|
|
101
170
|
content: string;
|
|
102
171
|
[key: string]: any;
|
|
103
172
|
};
|
|
104
|
-
/** Represents a product in the business context */
|
|
173
|
+
/** Represents a product in the business context (ProductBusinessDTO) */
|
|
105
174
|
type BusinessProduct = {
|
|
106
|
-
/** Product identifier */id: string; /**
|
|
107
|
-
|
|
175
|
+
/** Product identifier */id: string; /** Fleet identifier */
|
|
176
|
+
fleetId?: string; /** Product name */
|
|
177
|
+
name: string; /** Product type */
|
|
178
|
+
type?: string; /** Price */
|
|
179
|
+
price?: number; /** Whether tax is included */
|
|
180
|
+
taxIncluded?: boolean; /** Expiration date */
|
|
181
|
+
expirationDate?: string; /** Tax name */
|
|
182
|
+
taxName?: string; /** Tax rate */
|
|
183
|
+
taxRate?: number;
|
|
108
184
|
[key: string]: any;
|
|
109
185
|
};
|
|
110
186
|
/** Represents an invitation request */
|
|
@@ -112,8 +188,18 @@ type InvitationRequest = {
|
|
|
112
188
|
/** Invitation request identifier */id: string;
|
|
113
189
|
[key: string]: any;
|
|
114
190
|
};
|
|
115
|
-
/** Represents a business wallet */
|
|
191
|
+
/** Represents a business wallet (WalletDTO) */
|
|
116
192
|
type BusinessWallet = {
|
|
193
|
+
/** Wallet identifier */id?: string; /** Available amount */
|
|
194
|
+
availableAmount?: number; /** Initial amount */
|
|
195
|
+
initialAmount?: number; /** Promo code reference */
|
|
196
|
+
promoCodeReference?: string; /** Percentage discount */
|
|
197
|
+
percentage?: number; /** Discount category */
|
|
198
|
+
discountCategory?: string; /** Wallet type */
|
|
199
|
+
type?: string; /** Wallet usage */
|
|
200
|
+
usage?: string; /** Used amount */
|
|
201
|
+
usedAmount?: number; /** Entity identifier */
|
|
202
|
+
entityId?: string;
|
|
117
203
|
[key: string]: any;
|
|
118
204
|
};
|
|
119
205
|
/** Represents a business user profile */
|
|
@@ -144,10 +230,7 @@ declare const addUserToBusiness: (client: Client, businessId: string, userId: st
|
|
|
144
230
|
declare const archiveBusinessProfile: (client: Client, businessId: string, userId: string, profileId: string) => Promise<void>;
|
|
145
231
|
//#endregion
|
|
146
232
|
//#region src/bulkAddBusinessUsers.d.ts
|
|
147
|
-
|
|
148
|
-
userIds: string[];
|
|
149
|
-
};
|
|
150
|
-
declare const bulkAddBusinessUsers: (client: Client, businessId: string, body: BulkAddBusinessUsersBody) => Promise<void>;
|
|
233
|
+
declare const bulkAddBusinessUsers: (client: Client, businessId: string, file: Blob | Buffer, locale?: string) => Promise<any>;
|
|
151
234
|
//#endregion
|
|
152
235
|
//#region src/businessDelegatedAdmin.d.ts
|
|
153
236
|
declare const setDelegatedAdmin: (client: Client, businessId: string, userId: string) => Promise<void>;
|
|
@@ -160,18 +243,63 @@ declare const removeBusinessOwner: (client: Client, businessId: string, userId:
|
|
|
160
243
|
//#region src/chargeBusinessProduct.d.ts
|
|
161
244
|
type ChargeBusinessProductBody = {
|
|
162
245
|
productId: string;
|
|
246
|
+
amount: number;
|
|
247
|
+
userId?: string;
|
|
248
|
+
productNotes?: string;
|
|
249
|
+
serviceId?: string;
|
|
163
250
|
};
|
|
164
251
|
declare const chargeBusinessProduct: (client: Client, businessId: string, body: ChargeBusinessProductBody) => Promise<void>;
|
|
165
252
|
//#endregion
|
|
166
253
|
//#region src/createBusiness.d.ts
|
|
167
254
|
type CreateBusinessBody = {
|
|
168
255
|
name: string;
|
|
256
|
+
legalName?: string;
|
|
257
|
+
phoneNumber?: string;
|
|
258
|
+
faxNumber?: string;
|
|
259
|
+
email?: string;
|
|
260
|
+
vat?: string;
|
|
261
|
+
ein?: string;
|
|
262
|
+
registrationUrl?: string;
|
|
263
|
+
comment?: string;
|
|
264
|
+
paymentType?: string;
|
|
265
|
+
locale?: string;
|
|
266
|
+
invoiceFrequency?: string;
|
|
267
|
+
status?: string;
|
|
268
|
+
nationality?: string;
|
|
269
|
+
pec?: string;
|
|
270
|
+
legalForm?: string;
|
|
271
|
+
fiscalCode?: string;
|
|
272
|
+
taxNumberCountry?: string;
|
|
273
|
+
communityTaxNumber?: string;
|
|
274
|
+
sdicemCode?: string;
|
|
275
|
+
mandatoryTripNotes?: boolean;
|
|
276
|
+
billingAddress?: {
|
|
277
|
+
city?: string;
|
|
278
|
+
country?: string;
|
|
279
|
+
region?: string;
|
|
280
|
+
streetName?: string;
|
|
281
|
+
postalCode?: string;
|
|
282
|
+
};
|
|
283
|
+
address?: {
|
|
284
|
+
city?: string;
|
|
285
|
+
country?: string;
|
|
286
|
+
region?: string;
|
|
287
|
+
streetName?: string;
|
|
288
|
+
postalCode?: string;
|
|
289
|
+
};
|
|
290
|
+
billingGroup?: {
|
|
291
|
+
id?: string;
|
|
292
|
+
fleetId?: string;
|
|
293
|
+
discount?: number;
|
|
294
|
+
name?: string;
|
|
295
|
+
};
|
|
169
296
|
};
|
|
170
297
|
declare const createBusiness: (client: Client, body: CreateBusinessBody) => Promise<Business>;
|
|
171
298
|
//#endregion
|
|
172
299
|
//#region src/createBusinessCostCenter.d.ts
|
|
173
300
|
type CreateCostCenterBody = {
|
|
174
301
|
name: string;
|
|
302
|
+
value: string;
|
|
175
303
|
};
|
|
176
304
|
declare const createBusinessCostCenter: (client: Client, businessId: string, body: CreateCostCenterBody) => Promise<CostCenter>;
|
|
177
305
|
//#endregion
|
|
@@ -200,16 +328,33 @@ declare const getBusinessCostCenterById: (client: Client, businessId: string, co
|
|
|
200
328
|
declare const getBusinessCostCenters: (client: Client, businessId: string) => Promise<CostCenter[]>;
|
|
201
329
|
//#endregion
|
|
202
330
|
//#region src/getBusinesses.d.ts
|
|
203
|
-
declare const
|
|
331
|
+
declare const businessFiltersSchema: z.ZodObject<{
|
|
332
|
+
name: z.ZodOptional<z.ZodString>;
|
|
333
|
+
status: z.ZodOptional<z.ZodString>;
|
|
334
|
+
updateSince: z.ZodOptional<z.ZodString>;
|
|
335
|
+
}, z.core.$strip>;
|
|
336
|
+
type BusinessFilters = z.infer<typeof businessFiltersSchema>;
|
|
337
|
+
declare const getBusinesses: (client: Client, options?: PaginableOptions<BusinessFilters>) => Promise<PaginableResponse<Business>>;
|
|
204
338
|
//#endregion
|
|
205
339
|
//#region src/getBusinessInviteLink.d.ts
|
|
206
|
-
|
|
340
|
+
type GetBusinessInviteLinkParams = {
|
|
341
|
+
email: string;
|
|
342
|
+
firstName?: string;
|
|
343
|
+
lastName?: string;
|
|
344
|
+
costCenterId?: string;
|
|
345
|
+
};
|
|
346
|
+
declare const getBusinessInviteLink: (client: Client, businessId: string, params: GetBusinessInviteLinkParams) => Promise<BusinessInviteLink>;
|
|
207
347
|
//#endregion
|
|
208
348
|
//#region src/getBusinessInvoiceProducts.d.ts
|
|
209
349
|
declare const getBusinessInvoiceProducts: (client: Client, entityId: string, invoiceId: string) => Promise<any[]>;
|
|
210
350
|
//#endregion
|
|
211
351
|
//#region src/getBusinessInvoices.d.ts
|
|
212
|
-
declare const
|
|
352
|
+
declare const invoiceFiltersSchema: z.ZodObject<{
|
|
353
|
+
fromDate: z.ZodOptional<z.ZodString>;
|
|
354
|
+
toDate: z.ZodOptional<z.ZodString>;
|
|
355
|
+
}, z.core.$strip>;
|
|
356
|
+
type BusinessInvoiceFilters = z.infer<typeof invoiceFiltersSchema>;
|
|
357
|
+
declare const getBusinessInvoices: (client: Client, entityId: string, options?: PaginableOptions<BusinessInvoiceFilters>) => Promise<PaginableResponse<BusinessInvoice>>;
|
|
213
358
|
//#endregion
|
|
214
359
|
//#region src/getBusinessInvoiceTrips.d.ts
|
|
215
360
|
declare const getBusinessInvoiceTrips: (client: Client, entityId: string, invoiceId: string) => Promise<any[]>;
|
|
@@ -230,22 +375,49 @@ declare const getBusinessUserById: (client: Client, businessId: string, userId:
|
|
|
230
375
|
declare const getBusinessUserGlobalById: (client: Client, userId: string) => Promise<BusinessUser>;
|
|
231
376
|
//#endregion
|
|
232
377
|
//#region src/getBusinessUsers.d.ts
|
|
233
|
-
declare const
|
|
378
|
+
declare const businessUserFiltersSchema: z.ZodObject<{
|
|
379
|
+
role: z.ZodOptional<z.ZodString>;
|
|
380
|
+
status: z.ZodOptional<z.ZodString>;
|
|
381
|
+
}, z.core.$strip>;
|
|
382
|
+
type BusinessUserFilters = z.infer<typeof businessUserFiltersSchema>;
|
|
383
|
+
declare const getBusinessUsers: (client: Client, businessId: string, options?: PaginableOptions<BusinessUserFilters>) => Promise<PaginableResponse<BusinessUser>>;
|
|
234
384
|
//#endregion
|
|
235
385
|
//#region src/getBusinessWallet.d.ts
|
|
236
|
-
declare const getBusinessWallet: (client: Client, businessId: string) => Promise<BusinessWallet
|
|
386
|
+
declare const getBusinessWallet: (client: Client, businessId: string, options?: PaginableOptions) => Promise<PaginableResponse<BusinessWallet>>;
|
|
237
387
|
//#endregion
|
|
238
388
|
//#region src/getEntityBalance.d.ts
|
|
239
389
|
declare const getEntityBalance: (client: Client, entityId: string) => Promise<EntityBalance>;
|
|
240
390
|
//#endregion
|
|
241
391
|
//#region src/getEntityProducts.d.ts
|
|
242
|
-
declare const
|
|
392
|
+
declare const entityProductFiltersSchema: z.ZodObject<{
|
|
393
|
+
period: z.ZodString;
|
|
394
|
+
user: z.ZodOptional<z.ZodString>;
|
|
395
|
+
productDetailsType: z.ZodOptional<z.ZodEnum<{
|
|
396
|
+
UNIT: "UNIT";
|
|
397
|
+
ACCUMULATIVE: "ACCUMULATIVE";
|
|
398
|
+
DEFAULT: "DEFAULT";
|
|
399
|
+
}>>;
|
|
400
|
+
}, z.core.$strip>;
|
|
401
|
+
type EntityProductFilters = z.infer<typeof entityProductFiltersSchema>;
|
|
402
|
+
declare const getEntityProducts: (client: Client, entityId: string, options: PaginableOptions<EntityProductFilters>) => Promise<PaginableResponse<any>>;
|
|
243
403
|
//#endregion
|
|
244
404
|
//#region src/getEntityTrips.d.ts
|
|
245
|
-
declare const
|
|
405
|
+
declare const entityTripFiltersSchema: z.ZodObject<{
|
|
406
|
+
period: z.ZodString;
|
|
407
|
+
costCenterIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
408
|
+
user: z.ZodOptional<z.ZodString>;
|
|
409
|
+
}, z.core.$strip>;
|
|
410
|
+
type EntityTripFilters = z.infer<typeof entityTripFiltersSchema>;
|
|
411
|
+
declare const getEntityTrips: (client: Client, entityId: string, options: PaginableOptions<EntityTripFilters>) => Promise<PaginableResponse<any>>;
|
|
246
412
|
//#endregion
|
|
247
413
|
//#region src/getEntityTripsCost.d.ts
|
|
248
|
-
declare const
|
|
414
|
+
declare const tripsCostFiltersSchema: z.ZodObject<{
|
|
415
|
+
startDate: z.ZodString;
|
|
416
|
+
endDate: z.ZodString;
|
|
417
|
+
tripId: z.ZodOptional<z.ZodString>;
|
|
418
|
+
}, z.core.$strip>;
|
|
419
|
+
type TripsCostFilters = z.infer<typeof tripsCostFiltersSchema>;
|
|
420
|
+
declare const getEntityTripsCost: (client: Client, entityId: string, options: PaginableOptions<TripsCostFilters>) => Promise<PaginableResponse<any>>;
|
|
249
421
|
//#endregion
|
|
250
422
|
//#region src/getInvitationRequest.d.ts
|
|
251
423
|
declare const getInvitationRequest: (client: Client, invitationId: string) => Promise<InvitationRequest>;
|
|
@@ -257,13 +429,13 @@ declare const getInvoicePdf: (client: Client, invoiceId: string) => Promise<Arra
|
|
|
257
429
|
declare const getInvoiceRefundableAmount: (client: Client, invoiceId: string) => Promise<InvoiceRefundableAmount>;
|
|
258
430
|
//#endregion
|
|
259
431
|
//#region src/getInvoiceRefundNote.d.ts
|
|
260
|
-
declare const getInvoiceRefundNote: (client: Client, invoiceId: string) => Promise<InvoiceRefundNote>;
|
|
432
|
+
declare const getInvoiceRefundNote: (client: Client, invoiceId: string, paymentRefundPspReference?: string) => Promise<InvoiceRefundNote>;
|
|
261
433
|
//#endregion
|
|
262
434
|
//#region src/getOngoingTripNotes.d.ts
|
|
263
435
|
declare const getOngoingTripNotes: (client: Client, tripId: string) => Promise<TripNote[]>;
|
|
264
436
|
//#endregion
|
|
265
437
|
//#region src/getOngoingTrips.d.ts
|
|
266
|
-
declare const getOngoingTrips: (client: Client) => Promise<BusinessTrip
|
|
438
|
+
declare const getOngoingTrips: (client: Client, businessId: string, options?: PaginableOptions) => Promise<PaginableResponse<BusinessTrip>>;
|
|
267
439
|
//#endregion
|
|
268
440
|
//#region src/getStripePublishableKey.d.ts
|
|
269
441
|
declare const getStripePublishableKey: (client: Client) => Promise<StripeConfig>;
|
|
@@ -272,11 +444,14 @@ declare const getStripePublishableKey: (client: Client) => Promise<StripeConfig>
|
|
|
272
444
|
declare const getStripeSetup: (client: Client, businessId: string) => Promise<StripeSetup>;
|
|
273
445
|
//#endregion
|
|
274
446
|
//#region src/inviteBusinessUser.d.ts
|
|
275
|
-
type
|
|
447
|
+
type InviteBusinessUserParams = {
|
|
276
448
|
email: string;
|
|
449
|
+
firstName?: string;
|
|
450
|
+
lastName?: string;
|
|
277
451
|
costCenterId?: string;
|
|
452
|
+
locale?: string;
|
|
278
453
|
};
|
|
279
|
-
declare const inviteBusinessUser: (client: Client, businessId: string,
|
|
454
|
+
declare const inviteBusinessUser: (client: Client, businessId: string, params: InviteBusinessUserParams) => Promise<void>;
|
|
280
455
|
//#endregion
|
|
281
456
|
//#region src/listBusinessUsersGlobal.d.ts
|
|
282
457
|
type ListBusinessUsersGlobalBody = {
|
|
@@ -302,30 +477,73 @@ declare const refundInvoiceAmount: (client: Client, invoiceId: string, amount: n
|
|
|
302
477
|
declare const searchBusinessUsersByName: (client: Client, businessId: string, name: string) => Promise<BusinessUser[]>;
|
|
303
478
|
//#endregion
|
|
304
479
|
//#region src/searchBusinessUsersGlobal.d.ts
|
|
305
|
-
declare const searchBusinessUsersGlobal: (client: Client,
|
|
480
|
+
declare const searchBusinessUsersGlobal: (client: Client, name: string) => Promise<BusinessUser[]>;
|
|
306
481
|
//#endregion
|
|
307
482
|
//#region src/sendBusinessIban.d.ts
|
|
308
483
|
type SendBusinessIbanBody = {
|
|
309
484
|
iban: string;
|
|
485
|
+
entityId?: string;
|
|
310
486
|
};
|
|
311
487
|
declare const sendBusinessIban: (client: Client, businessId: string, body: SendBusinessIbanBody) => Promise<void>;
|
|
312
488
|
//#endregion
|
|
313
489
|
//#region src/setInvoiceExternalPayment.d.ts
|
|
314
490
|
type SetInvoiceExternalPaymentBody = {
|
|
315
|
-
|
|
316
|
-
|
|
491
|
+
requesterId: string;
|
|
492
|
+
notes?: string;
|
|
493
|
+
paymentMethod?: string;
|
|
317
494
|
};
|
|
318
495
|
declare const setInvoiceExternalPayment: (client: Client, invoiceId: string, body: SetInvoiceExternalPaymentBody) => Promise<void>;
|
|
319
496
|
//#endregion
|
|
320
497
|
//#region src/updateBusiness.d.ts
|
|
321
498
|
type UpdateBusinessBody = {
|
|
322
499
|
name?: string;
|
|
500
|
+
legalName?: string;
|
|
501
|
+
phoneNumber?: string;
|
|
502
|
+
faxNumber?: string;
|
|
503
|
+
email?: string;
|
|
504
|
+
vat?: string;
|
|
505
|
+
ein?: string;
|
|
506
|
+
registrationUrl?: string;
|
|
507
|
+
comment?: string;
|
|
508
|
+
paymentType?: string;
|
|
509
|
+
locale?: string;
|
|
510
|
+
invoiceFrequency?: string;
|
|
511
|
+
status?: string;
|
|
512
|
+
nationality?: string;
|
|
513
|
+
pec?: string;
|
|
514
|
+
legalForm?: string;
|
|
515
|
+
fiscalCode?: string;
|
|
516
|
+
taxNumberCountry?: string;
|
|
517
|
+
communityTaxNumber?: string;
|
|
518
|
+
sdicemCode?: string;
|
|
519
|
+
mandatoryTripNotes?: boolean;
|
|
520
|
+
billingAddress?: {
|
|
521
|
+
city?: string;
|
|
522
|
+
country?: string;
|
|
523
|
+
region?: string;
|
|
524
|
+
streetName?: string;
|
|
525
|
+
postalCode?: string;
|
|
526
|
+
};
|
|
527
|
+
address?: {
|
|
528
|
+
city?: string;
|
|
529
|
+
country?: string;
|
|
530
|
+
region?: string;
|
|
531
|
+
streetName?: string;
|
|
532
|
+
postalCode?: string;
|
|
533
|
+
};
|
|
534
|
+
billingGroup?: {
|
|
535
|
+
id?: string;
|
|
536
|
+
fleetId?: string;
|
|
537
|
+
discount?: number;
|
|
538
|
+
name?: string;
|
|
539
|
+
};
|
|
323
540
|
};
|
|
324
541
|
declare const updateBusiness: (client: Client, businessId: string, body: UpdateBusinessBody) => Promise<Business>;
|
|
325
542
|
//#endregion
|
|
326
543
|
//#region src/updateBusinessCostCenter.d.ts
|
|
327
544
|
type UpdateCostCenterBody = {
|
|
328
545
|
name?: string;
|
|
546
|
+
value?: string;
|
|
329
547
|
};
|
|
330
548
|
declare const updateBusinessCostCenter: (client: Client, businessId: string, costCenterId: string, body: UpdateCostCenterBody) => Promise<CostCenter>;
|
|
331
549
|
//#endregion
|
|
@@ -343,4 +561,4 @@ declare const updateBusinessUserProfile: (client: Client, businessId: string, us
|
|
|
343
561
|
//#region src/updateInvoiceStatus.d.ts
|
|
344
562
|
declare const updateInvoiceStatus: (client: Client, invoiceId: string, status: string) => Promise<void>;
|
|
345
563
|
//#endregion
|
|
346
|
-
export { AddBusinessCreditBody, AddTripNoteBody, AddUserToBusinessBody,
|
|
564
|
+
export { AddBusinessCreditBody, AddTripNoteBody, AddUserToBusinessBody, Business, BusinessBillingGroup, BusinessContact, BusinessFilters, BusinessInviteLink, BusinessInvoice, BusinessInvoiceFilters, BusinessPaymentDetails, BusinessProduct, BusinessTrip, BusinessUser, BusinessUserFilters, BusinessUserProfile, BusinessWallet, ChargeBusinessProductBody, CostCenter, CreateBusinessBody, CreateCostCenterBody, EntityBalance, EntityProductFilters, EntityTripFilters, EntityTripsCost, GetBusinessInviteLinkParams, InvitationRequest, InviteBusinessUserParams, InvoiceRefundNote, InvoiceRefundableAmount, ListBusinessUsersGlobalBody, RefundInvoiceBody, SendBusinessIbanBody, SetInvoiceExternalPaymentBody, SpringPage, StripeConfig, StripeSetup, TripNote, TripsCostFilters, UpdateBusinessBody, UpdateBusinessUserProfileBody, UpdateCostCenterBody, addBusinessCredit, addStripePayment, addTripNote, addUserToBusiness, archiveBusinessProfile, bulkAddBusinessUsers, chargeBusinessProduct, createBusiness, createBusinessCostCenter, deactivateBusinessProfile, deleteBusinessCostCenter, deleteInvitationRequest, getBusinessBillingGroups, getBusinessById, getBusinessContacts, getBusinessCostCenterById, getBusinessCostCenters, getBusinessInviteLink, getBusinessInvoiceProducts, getBusinessInvoiceTrips, getBusinessInvoices, getBusinessPaymentDetails, getBusinessProducts, getBusinessTripById, getBusinessUserById, getBusinessUserGlobalById, getBusinessUsers, getBusinessWallet, getBusinesses, getEntityBalance, getEntityProducts, getEntityTrips, getEntityTripsCost, getInvitationRequest, getInvoicePdf, getInvoiceRefundNote, getInvoiceRefundableAmount, getOngoingTripNotes, getOngoingTrips, getStripePublishableKey, getStripeSetup, inviteBusinessUser, listBusinessUsersGlobal, redeemBusinessPromoCode, refundInvoice, refundInvoiceAmount, removeBusinessOwner, removeDelegatedAdmin, searchBusinessUsersByName, searchBusinessUsersGlobal, sendBusinessIban, setBusinessOwner, setDelegatedAdmin, setInvoiceExternalPayment, updateBusiness, updateBusinessCostCenter, updateBusinessProfileStatus, updateBusinessUserProfile, updateInvoiceStatus };
|