@bisondesk/commons-sdk 1.0.315 → 1.0.316
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/lib/cjs/constants.js +1 -3
- package/lib/cjs/constants.js.map +1 -1
- package/lib/cjs/exact.js.map +1 -1
- package/lib/cjs/pdf-gen.js.map +1 -1
- package/lib/cjs/tasks.js.map +1 -1
- package/lib/cjs/types.js +1 -6
- package/lib/cjs/types.js.map +1 -1
- package/lib/constants.js +1 -3
- package/lib/constants.js.map +1 -1
- package/lib/esm/constants.js +1 -3
- package/lib/esm/constants.js.map +1 -1
- package/lib/esm/exact.js.map +1 -1
- package/lib/esm/pdf-gen.js.map +1 -1
- package/lib/esm/tasks.js.map +1 -1
- package/lib/esm/types.js +0 -5
- package/lib/esm/types.js.map +1 -1
- package/lib/exact.js.map +1 -1
- package/lib/pdf-gen.js.map +1 -1
- package/lib/tasks.js.map +1 -1
- package/lib/tsconfig.cjs.tsbuildinfo +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/types/constants.d.ts +3 -5
- package/lib/types/constants.d.ts.map +1 -1
- package/lib/types/exact.d.ts +0 -12
- package/lib/types/exact.d.ts.map +1 -1
- package/lib/types/pdf-gen.d.ts +0 -4
- package/lib/types/pdf-gen.d.ts.map +1 -1
- package/lib/types/tasks.d.ts +3 -2
- package/lib/types/tasks.d.ts.map +1 -1
- package/lib/types/types.d.ts +3 -19
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types.js +1 -6
- package/lib/types.js.map +1 -1
- package/package.json +1 -1
- package/src/constants.ts +1 -3
- package/src/exact.ts +0 -15
- package/src/pdf-gen.ts +0 -5
- package/src/tasks.ts +3 -2
- package/src/types.ts +4 -21
- package/tsconfig.tsbuildinfo +1 -1
package/lib/types/types.d.ts
CHANGED
|
@@ -17,10 +17,6 @@ export type NextList<T, M = {}> = {
|
|
|
17
17
|
meta: M;
|
|
18
18
|
totalCount?: number;
|
|
19
19
|
};
|
|
20
|
-
export type NextRequest = {
|
|
21
|
-
limit?: number;
|
|
22
|
-
nextToken?: string;
|
|
23
|
-
};
|
|
24
20
|
export type PaginatedRequest = {
|
|
25
21
|
limit?: number;
|
|
26
22
|
offset?: number;
|
|
@@ -131,21 +127,9 @@ export type VatValidationRequest = {
|
|
|
131
127
|
defaultCountry?: string;
|
|
132
128
|
input: string;
|
|
133
129
|
};
|
|
134
|
-
export type
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}>;
|
|
138
|
-
};
|
|
139
|
-
export type CurrencyConversionRequest = {
|
|
130
|
+
export type CurrencyLayerResponse = {
|
|
131
|
+
conversionRate: number;
|
|
132
|
+
targetCurrency: string;
|
|
140
133
|
sourceCurrency: string;
|
|
141
|
-
targetCurrency?: string;
|
|
142
134
|
};
|
|
143
|
-
export type CurrencyConversionResponse = {
|
|
144
|
-
sourceCurrency: string;
|
|
145
|
-
rates: Record<string, string>;
|
|
146
|
-
};
|
|
147
|
-
export declare enum TransactionType {
|
|
148
|
-
sale = "sale",
|
|
149
|
-
purchase = "purchase"
|
|
150
|
-
}
|
|
151
135
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/types/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI;IACrC,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,EAAE,CAAC,CAAC;IACR,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAA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AAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,IAAI,GAAG,SAAS,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,CACA;IAAE,SAAS,EAAE,KAAK,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAA;CAAE,GACzC;IACE,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,aAAa,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B,CACJ,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
package/lib/types.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Region = void 0;
|
|
4
4
|
var Region;
|
|
5
5
|
(function (Region) {
|
|
6
6
|
Region["euWest1"] = "eu-west-1";
|
|
7
7
|
})(Region = exports.Region || (exports.Region = {}));
|
|
8
|
-
var TransactionType;
|
|
9
|
-
(function (TransactionType) {
|
|
10
|
-
TransactionType["sale"] = "sale";
|
|
11
|
-
TransactionType["purchase"] = "purchase";
|
|
12
|
-
})(TransactionType = exports.TransactionType || (exports.TransactionType = {}));
|
|
13
8
|
//# sourceMappingURL=types.js.map
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":";;;AA8CA,IAAY,MAEX;AAFD,WAAY,MAAM;IAChB,+BAAqB,CAAA;AACvB,CAAC,EAFW,MAAM,GAAN,cAAM,KAAN,cAAM,QAEjB","sourcesContent":["import { AppRoles, TopLevelActions } from './constants';\nimport { LocationValue } from './locations';\nexport { GPSCoord, LocationValue } from './locations';\n\nexport type PaginatedList<T, M = {}> = {\n results: T[];\n nextToken?: undefined;\n meta: M;\n totalCount: number;\n};\n\nexport type PaginationRequest = {\n limit: number;\n offset: number;\n};\n\nexport type NextList<T, M = {}> = {\n results: T[];\n nextToken?: string;\n meta: M;\n totalCount?: number;\n};\n\nexport type PaginatedRequest = {\n limit?: number;\n offset?: number;\n};\n\nexport type Requester = {\n lang: string;\n roles: AppRoles[];\n actions: TopLevelActions[];\n tenantId: string;\n tenantLang: string;\n userAgent?: string;\n source?: string;\n userId: string;\n isApi: boolean;\n};\n\nexport type Option = {\n value: string | number;\n label: string;\n color?: string;\n};\n\nexport enum Region {\n euWest1 = 'eu-west-1',\n}\n\nexport type ErrorResponse = {\n message?: string;\n data?: unknown;\n};\n\nexport type MultiLangValue = { key?: string } & { [languageCode: string]: string };\n\nexport type CognitoInfo = {\n userPoolId: string;\n appClientId: string;\n region: Region;\n};\n\nexport type SearchPermissions = {\n users: string[];\n roles: AppRoles[];\n};\n\nexport type PhoneNumberValue = {\n country: string;\n e164: string;\n international: string;\n national: string;\n};\n\nexport type PhoneNumberRawValue = {\n defaultCountry?: string;\n input: string;\n};\n\nexport type LinkValue = {\n text?: string;\n url: string;\n};\n\nexport type Document = {\n type: string; // passport, driving_license, ...\n displayName: string;\n file: AttachmentValue;\n};\n\nexport type AttachmentValue = {\n contentType: string;\n fileName: string;\n id: string;\n previewSrc?: string;\n size: number;\n uploadedAt: string;\n uploadedBy: string;\n url: string;\n descriptions?: string | MultiLangValue;\n};\n\nexport type VatLayerResponseLog = {\n response: VatLayerResponse;\n raw: any;\n};\n\nexport type VatLayerResponse = {\n vatNumber: string;\n viesStatus: 'ok' | 'failure';\n} & (\n | { formatValid: boolean; viesValid: false; validAt?: undefined; countryCode?: string }\n | {\n formatValid: true;\n viesValid: boolean;\n validAt: string;\n countryCode: string;\n name: string;\n addressLines: string[];\n }\n);\n\nexport type VatValidationResponse = {\n vatNumber: string;\n formatValid?: boolean;\n viesStatus: 'ok' | 'failure';\n countryCode?: string;\n} & (\n | { viesValid: false; validAt?: undefined }\n | {\n viesValid: true;\n validAt: string;\n name?: string;\n normalizedAddress?: LocationValue;\n officialAddress?: string[];\n }\n);\n\nexport type VatValidationRequest = {\n defaultCountry?: string;\n input: string;\n};\n\nexport type CurrencyLayerResponse = {\n conversionRate: number;\n targetCurrency: string;\n sourceCurrency: string;\n};\n"]}
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
|
@@ -9,17 +9,16 @@ export enum AppRoles {
|
|
|
9
9
|
Manager = 'manager',
|
|
10
10
|
ParkLogistics = 'park_logistics',
|
|
11
11
|
AppManager = 'app_manager',
|
|
12
|
-
SeniorAccountant = 'senior_accountant',
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
export enum TopLevelActions {
|
|
16
15
|
AdministrationAll = 'admin:*',
|
|
17
16
|
DocumentsBrowse = 'docs:finance:browse',
|
|
18
17
|
LeadsAll = 'leads:*',
|
|
19
|
-
BrowseDocumentDrafts = 'docs:drafts:browse',
|
|
20
18
|
LeasingDebtorsView = 'leasing:debtors:view',
|
|
21
19
|
LeasingOverduesView = 'leasing:overdues:view',
|
|
22
20
|
LeasingContractsExport = 'leasing:contracts:export',
|
|
21
|
+
LeasingContractsRsExport = 'leasing:contracts:rs:export-rs', // rs stands for rental solutions
|
|
23
22
|
LeasingDebtorsExport = 'leasing:debtors:export',
|
|
24
23
|
MarketBrowse = 'market:browse',
|
|
25
24
|
MarketInsights = 'insights:market',
|
|
@@ -65,7 +64,6 @@ export enum BusinessEntityIds {
|
|
|
65
64
|
Vehicles = 'vehicles',
|
|
66
65
|
VehiclesPriceLists = 'vehicles_price_lists',
|
|
67
66
|
Debtors = 'debtors',
|
|
68
|
-
DocumentDrafts = 'document_drafts',
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
//
|
package/src/exact.ts
CHANGED
|
@@ -14,18 +14,3 @@ export type ExactClientAccount = {
|
|
|
14
14
|
exactTld: string;
|
|
15
15
|
authenticated: boolean;
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
// TODO remove once exact-sdk is correctly published
|
|
19
|
-
export type GlAccount = {
|
|
20
|
-
id: string;
|
|
21
|
-
code: number;
|
|
22
|
-
description: string;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export type Journal = {
|
|
26
|
-
code: string;
|
|
27
|
-
type: string;
|
|
28
|
-
glAccountCode: string;
|
|
29
|
-
glAccountDescription: string;
|
|
30
|
-
description: string;
|
|
31
|
-
};
|
package/src/pdf-gen.ts
CHANGED
package/src/tasks.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BusinessEntityIds } from './constants';
|
|
2
|
-
import { NextRequest } from './types';
|
|
3
2
|
|
|
4
3
|
export enum TaskPriority {
|
|
5
4
|
Normal = 30,
|
|
@@ -58,6 +57,8 @@ export type TaskNotificationData = {
|
|
|
58
57
|
};
|
|
59
58
|
|
|
60
59
|
export type TasksQuery = {
|
|
60
|
+
limit?: number;
|
|
61
|
+
nextToken?: string;
|
|
61
62
|
assignee?: string;
|
|
62
63
|
showDone?: boolean;
|
|
63
|
-
}
|
|
64
|
+
};
|
package/src/types.ts
CHANGED
|
@@ -21,15 +21,11 @@ export type NextList<T, M = {}> = {
|
|
|
21
21
|
totalCount?: number;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export type NextRequest = {
|
|
25
|
-
limit?: number;
|
|
26
|
-
nextToken?: string;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
24
|
export type PaginatedRequest = {
|
|
30
25
|
limit?: number;
|
|
31
26
|
offset?: number;
|
|
32
27
|
};
|
|
28
|
+
|
|
33
29
|
export type Requester = {
|
|
34
30
|
lang: string;
|
|
35
31
|
roles: AppRoles[];
|
|
@@ -146,21 +142,8 @@ export type VatValidationRequest = {
|
|
|
146
142
|
input: string;
|
|
147
143
|
};
|
|
148
144
|
|
|
149
|
-
export type
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
export type CurrencyConversionRequest = {
|
|
154
|
-
sourceCurrency: string;
|
|
155
|
-
targetCurrency?: string;
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
export type CurrencyConversionResponse = {
|
|
145
|
+
export type CurrencyLayerResponse = {
|
|
146
|
+
conversionRate: number;
|
|
147
|
+
targetCurrency: string;
|
|
159
148
|
sourceCurrency: string;
|
|
160
|
-
rates: Record<string, string>;
|
|
161
149
|
};
|
|
162
|
-
|
|
163
|
-
export enum TransactionType {
|
|
164
|
-
sale = 'sale',
|
|
165
|
-
purchase = 'purchase',
|
|
166
|
-
}
|