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