Skip to content

Commit 5da768a

Browse files
committed
v1.2.0 FabricAI AI Inside v2.28.1
1 parent 4b802eb commit 5da768a

File tree

3 files changed

+52
-6
lines changed

3 files changed

+52
-6
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rantalainen/fabricai-api-client",
3-
"version": "1.1.1",
3+
"version": "1.2.0",
44
"description": "",
55
"main": "dist/index.js",
66
"scripts": {

src/api.ts

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,14 @@ export interface InvoiceInvoiceRow {
199199
* @example 12.4
200200
*/
201201
valueInOriginalCurrency?: number;
202+
/**
203+
* Vat deduction percentage that is applicable to this row
204+
* @example 100
205+
*/
206+
vatDeductionPercent?: number;
202207
/**
203208
* Vat percentage that is applicable to this row
204-
* @example 24
209+
* @example 25.5
205210
*/
206211
vatPercent: number;
207212
/**
@@ -360,6 +365,7 @@ export interface ModelsUser {
360365
createdAt?: string;
361366
email?: string;
362367
name?: string;
368+
tags?: TypesHStore;
363369
uid?: string;
364370
updatedAt?: string;
365371
}
@@ -412,6 +418,11 @@ export interface ModextClient {
412418
* @example 4123
413419
*/
414420
organizationId?: number;
421+
/**
422+
* Client overrides.
423+
* If set, these will override the respective values on all rows of all invoices for this client.
424+
*/
425+
overrides?: ModextClientOverrides;
415426
/** @default "BACKGROUND_PROCESS" */
416427
serviceTemplate?:
417428
| "BACKGROUND_PROCESS"
@@ -431,6 +442,28 @@ export interface ModextClient {
431442
updatedAt?: string;
432443
}
433444

445+
export interface ModextClientOverrides {
446+
/**
447+
* Override VAT deduction percentage for the client's invoices
448+
* @min 0
449+
* @max 100
450+
* @example 50
451+
*/
452+
vatDeductionPercent?: number;
453+
/**
454+
* Override VAT percentage for the client's invoices
455+
* @min 0
456+
* @max 100
457+
* @example 25.5
458+
*/
459+
vatPercent?: number;
460+
/**
461+
* Override VAT status for the client's invoices
462+
* @example "vat_12"
463+
*/
464+
vatStatus?: string;
465+
}
466+
434467
export interface ModextCollectionClient {
435468
businessId?: string;
436469
createdAt?: string;
@@ -520,6 +553,7 @@ export interface ModextUser {
520553
createdAt?: string;
521554
email?: string;
522555
name?: string;
556+
tags?: TypesHStore;
523557
/** List of teams' IDs the user belongs to */
524558
teams?: number[];
525559
uid?: string;
@@ -1276,7 +1310,7 @@ export class HttpClient<SecurityDataType = unknown> {
12761310

12771311
/**
12781312
* @title AI Inside
1279-
* @version v2.27.4
1313+
* @version v2.28.1
12801314
* @termsOfService https://fabricai.fi
12811315
* @baseUrl https://ai.fabricai.io
12821316
* @contact API Support (https://fabricai.fi)
@@ -1749,7 +1783,18 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
17491783
* @response `404` `ResponseErrorResponse` Not Found
17501784
* @response `500` `ResponseErrorResponse` Internal Server Error
17511785
*/
1752-
createInvoice: (clientId: number, invoice: PredictionInvoiceInput, params: RequestParams = {}) =>
1786+
createInvoice: (
1787+
clientId: number,
1788+
invoice: PredictionInvoiceInput,
1789+
query?: {
1790+
/**
1791+
* Reconciliation flag
1792+
* @default false
1793+
*/
1794+
reconciliation?: boolean;
1795+
},
1796+
params: RequestParams = {},
1797+
) =>
17531798
this.request<
17541799
ResponseDataResponse & {
17551800
data?: PredictionDetailedInvoice;
@@ -1758,6 +1803,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
17581803
>({
17591804
path: `/clients/${clientId}/invoices`,
17601805
method: "POST",
1806+
query: query,
17611807
body: invoice,
17621808
secure: true,
17631809
type: ContentType.Json,

0 commit comments

Comments
 (0)