@bisondesk/commons-sdk 1.0.274 → 1.0.276
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/becris.js +3 -0
- package/lib/becris.js.map +1 -0
- package/lib/cjs/becris.js +3 -0
- package/lib/cjs/becris.js.map +1 -0
- package/lib/cjs/constants.js +103 -0
- package/lib/cjs/constants.js.map +1 -0
- package/lib/cjs/dayjs-utils.js +26 -0
- package/lib/cjs/dayjs-utils.js.map +1 -0
- package/lib/cjs/discussions.js +5 -0
- package/lib/cjs/discussions.js.map +1 -0
- package/lib/cjs/errors.js +67 -0
- package/lib/cjs/errors.js.map +1 -0
- package/lib/cjs/exact.js +3 -0
- package/lib/cjs/exact.js.map +1 -0
- package/lib/cjs/fetch.js +21 -0
- package/lib/cjs/fetch.js.map +1 -0
- package/lib/cjs/ids.js +35 -0
- package/lib/cjs/ids.js.map +1 -0
- package/lib/cjs/insurance.js +3 -0
- package/lib/cjs/insurance.js.map +1 -0
- package/lib/cjs/location-utils.js +11 -0
- package/lib/cjs/location-utils.js.map +1 -0
- package/lib/cjs/locations.js +95 -0
- package/lib/cjs/locations.js.map +1 -0
- package/lib/cjs/messages.js +3 -0
- package/lib/cjs/messages.js.map +1 -0
- package/lib/cjs/notifications.js +13 -0
- package/lib/cjs/notifications.js.map +1 -0
- package/lib/cjs/pdf-gen.js +3 -0
- package/lib/cjs/pdf-gen.js.map +1 -0
- package/lib/cjs/storage.js +14 -0
- package/lib/cjs/storage.js.map +1 -0
- package/lib/cjs/types.js +8 -0
- package/lib/cjs/types.js.map +1 -0
- package/lib/constants.js +103 -0
- package/lib/constants.js.map +1 -0
- package/lib/dayjs-utils.js +25 -0
- package/lib/dayjs-utils.js.map +1 -0
- package/lib/discussions.js +5 -0
- package/lib/discussions.js.map +1 -0
- package/lib/errors.js +67 -0
- package/lib/errors.js.map +1 -0
- package/lib/esm/becris.js +2 -0
- package/lib/esm/becris.js.map +1 -0
- package/lib/esm/constants.js +100 -0
- package/lib/esm/constants.js.map +1 -0
- package/lib/esm/dayjs-utils.js +18 -0
- package/lib/esm/dayjs-utils.js.map +1 -0
- package/lib/esm/discussions.js +2 -0
- package/lib/esm/discussions.js.map +1 -0
- package/lib/esm/errors.js +57 -0
- package/lib/esm/errors.js.map +1 -0
- package/lib/esm/exact.js +2 -0
- package/lib/esm/exact.js.map +1 -0
- package/lib/esm/fetch.js +16 -0
- package/lib/esm/fetch.js.map +1 -0
- package/lib/esm/ids.js +31 -0
- package/lib/esm/ids.js.map +1 -0
- package/lib/esm/insurance.js +2 -0
- package/lib/esm/insurance.js.map +1 -0
- package/lib/esm/location-utils.js +7 -0
- package/lib/esm/location-utils.js.map +1 -0
- package/lib/esm/locations.js +90 -0
- package/lib/esm/locations.js.map +1 -0
- package/lib/esm/messages.js +2 -0
- package/lib/esm/messages.js.map +1 -0
- package/lib/esm/notifications.js +10 -0
- package/lib/esm/notifications.js.map +1 -0
- package/lib/esm/pdf-gen.js +2 -0
- package/lib/esm/pdf-gen.js.map +1 -0
- package/lib/esm/storage.js +11 -0
- package/lib/esm/storage.js.map +1 -0
- package/lib/esm/types.js +5 -0
- package/lib/esm/types.js.map +1 -0
- package/lib/exact.js +3 -0
- package/lib/exact.js.map +1 -0
- package/lib/fetch.js +20 -0
- package/lib/fetch.js.map +1 -0
- package/lib/ids.js +35 -0
- package/lib/ids.js.map +1 -0
- package/lib/insurance.js +3 -0
- package/lib/insurance.js.map +1 -0
- package/lib/location-utils.js +11 -0
- package/lib/location-utils.js.map +1 -0
- package/lib/locations.js +95 -0
- package/lib/locations.js.map +1 -0
- package/lib/messages.js +3 -0
- package/lib/messages.js.map +1 -0
- package/lib/notifications.js +13 -0
- package/lib/notifications.js.map +1 -0
- package/lib/pdf-gen.js +3 -0
- package/lib/pdf-gen.js.map +1 -0
- package/lib/storage.js +14 -0
- package/lib/storage.js.map +1 -0
- package/lib/tsconfig.cjs.tsbuildinfo +1 -0
- package/lib/tsconfig.esm.tsbuildinfo +1 -0
- package/lib/types/becris.d.ts +40 -0
- package/lib/types/becris.d.ts.map +1 -0
- package/lib/types/constants.d.ts +55 -0
- package/lib/types/constants.d.ts.map +1 -0
- package/lib/types/dayjs-utils.d.ts +8 -0
- package/lib/types/dayjs-utils.d.ts.map +1 -0
- package/lib/types/discussions.d.ts +43 -0
- package/lib/types/discussions.d.ts.map +1 -0
- package/lib/types/errors.d.ts +36 -0
- package/lib/types/errors.d.ts.map +1 -0
- package/lib/types/exact.d.ts +10 -0
- package/lib/types/exact.d.ts.map +1 -0
- package/lib/types/fetch.d.ts +3 -0
- package/lib/types/fetch.d.ts.map +1 -0
- package/lib/types/ids.d.ts +9 -0
- package/lib/types/ids.d.ts.map +1 -0
- package/lib/types/insurance.d.ts +20 -0
- package/lib/types/insurance.d.ts.map +1 -0
- package/lib/types/location-utils.d.ts +3 -0
- package/lib/types/location-utils.d.ts.map +1 -0
- package/lib/types/locations.d.ts +34 -0
- package/lib/types/locations.d.ts.map +1 -0
- package/lib/types/messages.d.ts +57 -0
- package/lib/types/messages.d.ts.map +1 -0
- package/lib/types/notifications.d.ts +51 -0
- package/lib/types/notifications.d.ts.map +1 -0
- package/lib/types/pdf-gen.d.ts +40 -0
- package/lib/types/pdf-gen.d.ts.map +1 -0
- package/lib/types/storage.d.ts +63 -0
- package/lib/types/storage.d.ts.map +1 -0
- package/lib/types/types.d.ts +124 -0
- package/lib/types/types.d.ts.map +1 -0
- package/lib/types.js +8 -0
- package/lib/types.js.map +1 -0
- package/package.json +1 -1
- package/src/constants.ts +2 -1
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ValidationError } from 'joi';
|
|
2
|
+
export declare class XError extends Error {
|
|
3
|
+
errorCtx: any;
|
|
4
|
+
constructor(message?: string, errorCtx?: any);
|
|
5
|
+
}
|
|
6
|
+
export declare class WrappedError extends Error {
|
|
7
|
+
errorCtx: any;
|
|
8
|
+
constructor(err: Error, errorCtx?: any);
|
|
9
|
+
}
|
|
10
|
+
export declare class AsyncStopError extends Error {
|
|
11
|
+
constructor(message?: string);
|
|
12
|
+
}
|
|
13
|
+
export declare class ForbiddenError extends Error {
|
|
14
|
+
constructor(message?: string);
|
|
15
|
+
}
|
|
16
|
+
export declare class EntryAlreadyExistsError extends Error {
|
|
17
|
+
constructor(message?: string);
|
|
18
|
+
}
|
|
19
|
+
type FieldValidationError = {
|
|
20
|
+
message: string;
|
|
21
|
+
path: Array<string | number>;
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
export declare class InvalidArgumentsError extends Error {
|
|
25
|
+
validationErrors?: {
|
|
26
|
+
errors: FieldValidationError[];
|
|
27
|
+
};
|
|
28
|
+
isValidation: boolean;
|
|
29
|
+
errorCtx: any;
|
|
30
|
+
constructor(message?: string, errors?: ValidationError, errorCtx?: any);
|
|
31
|
+
}
|
|
32
|
+
export declare class UnauthorizedError extends Error {
|
|
33
|
+
constructor(message?: string);
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"/","sources":["errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAuB,MAAM,KAAK,CAAC;AAE3D,qBAAa,MAAO,SAAQ,KAAK;IAC/B,QAAQ,EAAE,GAAG,CAAC;gBAEF,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,GAAG;CAK7C;AAED,qBAAa,YAAa,SAAQ,KAAK;IACrC,QAAQ,EAAE,GAAG,CAAC;gBAEF,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,GAAG;CAMvC;AAED,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,OAAO,CAAC,EAAE,MAAM;CAI7B;AAED,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,OAAO,CAAC,EAAE,MAAM;CAI7B;AAED,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,OAAO,CAAC,EAAE,MAAM;CAI7B;AAED,KAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AACF,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,gBAAgB,CAAC,EAAE;QAAE,MAAM,EAAE,oBAAoB,EAAE,CAAA;KAAE,CAAC;IACtD,YAAY,UAAQ;IACpB,QAAQ,EAAE,GAAG,CAAC;gBAEF,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,GAAG;CAiBvE;AAED,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,OAAO,CAAC,EAAE,MAAM;CAI7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exact.d.ts","sourceRoot":"/","sources":["exact.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"/","sources":["fetch.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,WAAW,EAAE,WAAW,EAAY,MAAM,YAAY,CAAC;AAGvE,eAAO,MAAM,SAAS,WACf,WAAW,SACT,WAAW,2BAenB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare enum Alphabet {
|
|
2
|
+
Full = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_",
|
|
3
|
+
Alphanumeric = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
|
4
|
+
Lowercase = "abcdefghijklmnopqrstuvwxyz",
|
|
5
|
+
LowerAlphanumeric = "0123456789abcdefghijklmnopqrstuvwxyz",
|
|
6
|
+
ReferenceCode = "123456789ABCDEFGHJKMNPQRSTUVWXYZ"
|
|
7
|
+
}
|
|
8
|
+
export declare const generateId: (idLength?: number, alphabet?: Alphabet) => string;
|
|
9
|
+
//# sourceMappingURL=ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.d.ts","sourceRoot":"/","sources":["ids.ts"],"names":[],"mappings":"AAEA,oBAAY,QAAQ;IAClB,IAAI,oEAAoE;IACxE,YAAY,mEAAmE;IAC/E,SAAS,+BAA+B;IACxC,iBAAiB,yCAAyC;IAC1D,aAAa,qCAAqC;CACnD;AAID,eAAO,MAAM,UAAU,cAAc,MAAM,aAAiB,QAAQ,KAAmB,MAQtF,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type InsuranceEntry = {
|
|
2
|
+
checkedAt: string;
|
|
3
|
+
insured: boolean;
|
|
4
|
+
};
|
|
5
|
+
export type InsuranceCheckEvent = {
|
|
6
|
+
contractId: string;
|
|
7
|
+
tenantId: string;
|
|
8
|
+
vin: string;
|
|
9
|
+
licensePlate?: string;
|
|
10
|
+
};
|
|
11
|
+
export type InsuranceCheckResponseEvent = InsuranceCheckEvent & {
|
|
12
|
+
insurance: InsuranceEntry;
|
|
13
|
+
};
|
|
14
|
+
export type InsuranceHistoryRequest = {
|
|
15
|
+
contractId: string;
|
|
16
|
+
tenantId: string;
|
|
17
|
+
limit?: number;
|
|
18
|
+
nextToken?: string;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=insurance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insurance.d.ts","sourceRoot":"/","sources":["insurance.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,mBAAmB,GAAG;IAC9D,SAAS,EAAE,cAAc,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location-utils.d.ts","sourceRoot":"/","sources":["location-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,eAAO,MAAM,cAAc,YAAa,aAAa,WAAU,MAAM,KAAY,MAMhF,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type GPSCoord = {
|
|
2
|
+
lat: number;
|
|
3
|
+
lon: number;
|
|
4
|
+
alt?: number;
|
|
5
|
+
};
|
|
6
|
+
export type LocationValue = {
|
|
7
|
+
addressLine1?: string;
|
|
8
|
+
addressLine2?: string;
|
|
9
|
+
city?: string;
|
|
10
|
+
country: string;
|
|
11
|
+
postalCode?: string;
|
|
12
|
+
gps?: GPSCoord;
|
|
13
|
+
};
|
|
14
|
+
export type RoutesRequest = {
|
|
15
|
+
origin: LocationValue;
|
|
16
|
+
destination: LocationValue;
|
|
17
|
+
};
|
|
18
|
+
export declare enum RouteLabel {
|
|
19
|
+
Unspecified = "ROUTE_LABEL_UNSPECIFIED",
|
|
20
|
+
Default = "DEFAULT_ROUTE",
|
|
21
|
+
DefaultAlternate = "DEFAULT_ROUTE_ALTERNATE",
|
|
22
|
+
FuelEfficient = "FUEL_EFFICIENT"
|
|
23
|
+
}
|
|
24
|
+
export type Route = {
|
|
25
|
+
duration: string;
|
|
26
|
+
distanceMeters: number;
|
|
27
|
+
routeLabels: RouteLabel[];
|
|
28
|
+
};
|
|
29
|
+
export type RoutesResponse = {
|
|
30
|
+
routes: Route[];
|
|
31
|
+
};
|
|
32
|
+
export declare const isEUCountry: (country: string) => boolean;
|
|
33
|
+
export declare const isEuropeanCountry: (country: string) => boolean;
|
|
34
|
+
//# sourceMappingURL=locations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locations.d.ts","sourceRoot":"/","sources":["locations.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,EAAE,aAAa,CAAC;CAC5B,CAAC;AAEF,oBAAY,UAAU;IACpB,WAAW,4BAA4B;IACvC,OAAO,kBAAkB;IACzB,gBAAgB,4BAA4B;IAC5C,aAAa,mBAAmB;CACjC;AAED,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,WAAW,YAAa,MAAM,KAAG,OA6BX,CAAC;AAEpC,eAAO,MAAM,iBAAiB,YAAa,MAAM,KAAG,OAqDjB,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { AttachmentValue } from './types';
|
|
2
|
+
export type EmailAddress = {
|
|
3
|
+
name?: string;
|
|
4
|
+
email: string;
|
|
5
|
+
};
|
|
6
|
+
export type EmailDestination = EmailAddress & {
|
|
7
|
+
organizationId?: string;
|
|
8
|
+
contactId?: string;
|
|
9
|
+
addressType: 'TO' | 'CC' | 'BCC';
|
|
10
|
+
};
|
|
11
|
+
export type EmailContent = {
|
|
12
|
+
subject: string;
|
|
13
|
+
body: {
|
|
14
|
+
text?: string;
|
|
15
|
+
html?: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type EmailMessage = {
|
|
19
|
+
id: string;
|
|
20
|
+
sentAt: string;
|
|
21
|
+
sentBy: string;
|
|
22
|
+
content?: AttachmentValue;
|
|
23
|
+
subject: string;
|
|
24
|
+
source: EmailAddress;
|
|
25
|
+
replyTo?: EmailAddress;
|
|
26
|
+
destinations: EmailDestination[];
|
|
27
|
+
};
|
|
28
|
+
export type EmailMessageEvent = {
|
|
29
|
+
tenantId: string;
|
|
30
|
+
message: EmailMessage;
|
|
31
|
+
};
|
|
32
|
+
export type TemplatedEmailRequest = {
|
|
33
|
+
data: Record<string, unknown>;
|
|
34
|
+
destinations: EmailDestination[];
|
|
35
|
+
replyTo?: EmailAddress;
|
|
36
|
+
source: EmailAddress;
|
|
37
|
+
subject: string;
|
|
38
|
+
template: string;
|
|
39
|
+
attachments?: AttachmentValue[];
|
|
40
|
+
};
|
|
41
|
+
export type EmailRequest = {
|
|
42
|
+
references?: string[] | string;
|
|
43
|
+
inReplyTo?: string;
|
|
44
|
+
destinations: EmailDestination[];
|
|
45
|
+
replyTo?: EmailAddress;
|
|
46
|
+
source: EmailAddress;
|
|
47
|
+
subject: string;
|
|
48
|
+
attachments?: AttachmentValue[];
|
|
49
|
+
body: {
|
|
50
|
+
text?: string;
|
|
51
|
+
html: string;
|
|
52
|
+
} | {
|
|
53
|
+
html?: string;
|
|
54
|
+
text: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"/","sources":["messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAE/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;IAChC,IAAI,EACA;QACE,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,GACD;QACE,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACP,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { BusinessEntityIds } from './constants';
|
|
2
|
+
export declare enum GroupableNotificationOrigin {
|
|
3
|
+
Message = "message"
|
|
4
|
+
}
|
|
5
|
+
export declare enum NotificationVisibility {
|
|
6
|
+
UNREAD = "unread",
|
|
7
|
+
READ = "read"
|
|
8
|
+
}
|
|
9
|
+
type BaseMeta = {
|
|
10
|
+
snippet?: string;
|
|
11
|
+
};
|
|
12
|
+
export type NewNotificationsEvent<T extends BaseMeta = BaseMeta> = {
|
|
13
|
+
tenantId: string;
|
|
14
|
+
notifications: NewNotification<T>[];
|
|
15
|
+
};
|
|
16
|
+
type BaseNotification<T extends BaseMeta = BaseMeta> = {
|
|
17
|
+
sourceId: string;
|
|
18
|
+
destinationId: string;
|
|
19
|
+
businessEntityId: BusinessEntityIds;
|
|
20
|
+
recordId: string;
|
|
21
|
+
recordTitle?: string;
|
|
22
|
+
meta: T;
|
|
23
|
+
origin: string;
|
|
24
|
+
};
|
|
25
|
+
export type NewNotification<T extends BaseMeta = BaseMeta> = BaseNotification<T>;
|
|
26
|
+
export type Notification<T extends BaseMeta = BaseMeta> = BaseNotification<T> & {
|
|
27
|
+
id: string;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
visibility: NotificationVisibility;
|
|
30
|
+
};
|
|
31
|
+
export type NotificationReadUpdates = {
|
|
32
|
+
notificationIds: string[] | undefined;
|
|
33
|
+
origin?: GroupableNotificationOrigin;
|
|
34
|
+
};
|
|
35
|
+
export type NotificationsInfo = NotificationsStats & {
|
|
36
|
+
externalPushAppId?: string;
|
|
37
|
+
};
|
|
38
|
+
export type NotificationsStats = {
|
|
39
|
+
unreadCount: number;
|
|
40
|
+
unseen: boolean;
|
|
41
|
+
latestSeenAt?: string;
|
|
42
|
+
latestNotificationAt?: string;
|
|
43
|
+
};
|
|
44
|
+
export type NotificationsQuery = {
|
|
45
|
+
limit?: number;
|
|
46
|
+
unreadOnly?: boolean;
|
|
47
|
+
nextToken?: string;
|
|
48
|
+
origin?: GroupableNotificationOrigin;
|
|
49
|
+
};
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=notifications.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.d.ts","sourceRoot":"/","sources":["notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE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E,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,2BAA2B,CAAC;CACtC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BusinessEntityIds } from './constants';
|
|
2
|
+
import { AttachmentValue } from './types';
|
|
3
|
+
export type TemplateData = {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
export type NewPdfTemplateGroup = {
|
|
7
|
+
exampleData?: TemplateData;
|
|
8
|
+
title: string;
|
|
9
|
+
id: string;
|
|
10
|
+
};
|
|
11
|
+
export type PdfTemplateGroup = NewPdfTemplateGroup & {
|
|
12
|
+
modifiedAt: string;
|
|
13
|
+
modifiedBy: string;
|
|
14
|
+
};
|
|
15
|
+
type BasePdfTemplate = {
|
|
16
|
+
branch: string;
|
|
17
|
+
docx: AttachmentValue;
|
|
18
|
+
groupId: string;
|
|
19
|
+
language: string;
|
|
20
|
+
};
|
|
21
|
+
export type PdfTemplate = BasePdfTemplate & {
|
|
22
|
+
id: string;
|
|
23
|
+
modifiedAt: string;
|
|
24
|
+
modifiedBy: string;
|
|
25
|
+
pdf: AttachmentValue;
|
|
26
|
+
};
|
|
27
|
+
export type NewPdfTemplate = BasePdfTemplate & {
|
|
28
|
+
id?: string;
|
|
29
|
+
};
|
|
30
|
+
export type GeneratePdfEvent = {
|
|
31
|
+
branch: string;
|
|
32
|
+
businessEntityId: BusinessEntityIds;
|
|
33
|
+
data: TemplateData;
|
|
34
|
+
groupId: string;
|
|
35
|
+
language: string;
|
|
36
|
+
outputFilename?: string;
|
|
37
|
+
tenantId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,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type Joi from 'joi';
|
|
2
|
+
import { Requester } from './types';
|
|
3
|
+
export type UploadInfo = {
|
|
4
|
+
id: string;
|
|
5
|
+
uploadUrl: string;
|
|
6
|
+
downloadPath: string;
|
|
7
|
+
method: 'POST' | 'PATCH' | 'PUT';
|
|
8
|
+
headers?: {
|
|
9
|
+
[name: string]: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type VideoDownloadInfo = {
|
|
13
|
+
url: string;
|
|
14
|
+
quality: string;
|
|
15
|
+
size: number;
|
|
16
|
+
};
|
|
17
|
+
export type VideoInfo = {
|
|
18
|
+
status: 'SUCCESS' | 'PROCESSING' | 'ERROR';
|
|
19
|
+
downloads: VideoDownloadInfo[];
|
|
20
|
+
id: string;
|
|
21
|
+
};
|
|
22
|
+
export declare enum UploadProviders {
|
|
23
|
+
Vimeo = "vimeo",
|
|
24
|
+
S3 = "s3"
|
|
25
|
+
}
|
|
26
|
+
type BaseUploadUrlRequest = {
|
|
27
|
+
contentType: string;
|
|
28
|
+
};
|
|
29
|
+
export type VimeoUploadRequest = BaseUploadUrlRequest & {
|
|
30
|
+
size: number;
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
export type S3UploadRequest = BaseUploadUrlRequest & {
|
|
34
|
+
shared: boolean;
|
|
35
|
+
fileName: string;
|
|
36
|
+
businessEntityId: string;
|
|
37
|
+
};
|
|
38
|
+
export type UploadUrlRequest<Provider extends UploadProviders> = Provider extends UploadProviders.Vimeo ? VimeoUploadRequest : Provider extends UploadProviders.S3 ? S3UploadRequest : {};
|
|
39
|
+
export type UploadProvider = {
|
|
40
|
+
validationSchema: Joi.ObjectSchema<any>;
|
|
41
|
+
getVideoListInfo: (requester: Requester, videoIds: string[]) => Promise<VideoInfo[]>;
|
|
42
|
+
getUploadInfo(requester: Requester, request: UploadUrlRequest<UploadProviders>): Promise<UploadInfo>;
|
|
43
|
+
};
|
|
44
|
+
export type UploadProvidersDefinition = {
|
|
45
|
+
[key in UploadProviders]: UploadProvider;
|
|
46
|
+
};
|
|
47
|
+
export declare enum MediaExportResolution {
|
|
48
|
+
Low = "low",
|
|
49
|
+
High = "high"
|
|
50
|
+
}
|
|
51
|
+
export type MediaExportRequest = {
|
|
52
|
+
urls: string[];
|
|
53
|
+
resolution?: MediaExportResolution;
|
|
54
|
+
};
|
|
55
|
+
export type MediaExportEvent = {
|
|
56
|
+
s3Keys: string[];
|
|
57
|
+
outputId: string;
|
|
58
|
+
tenantId: string;
|
|
59
|
+
entityId: string;
|
|
60
|
+
resolution: MediaExportResolution;
|
|
61
|
+
};
|
|
62
|
+
export {};
|
|
63
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"/","sources":["storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;IACjC,OAAO,CAAC,EAAE;QACR,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,SAAS,GAAG,YAAY,GAAG,OAAO,CAAC;IAC3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C;CACpC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,qBAAqB,CAAC;CACnC,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { AppRoles, TopLevelActions } from './constants';
|
|
2
|
+
import { LocationValue } from './locations';
|
|
3
|
+
export { GPSCoord, LocationValue } from './locations';
|
|
4
|
+
export type PaginatedList<T, M = {}> = {
|
|
5
|
+
results: T[];
|
|
6
|
+
nextToken?: undefined;
|
|
7
|
+
meta: M;
|
|
8
|
+
totalCount: number;
|
|
9
|
+
};
|
|
10
|
+
export type PaginationRequest = {
|
|
11
|
+
limit: number;
|
|
12
|
+
offset: number;
|
|
13
|
+
};
|
|
14
|
+
export type NextList<T, M = {}> = {
|
|
15
|
+
results: T[];
|
|
16
|
+
nextToken?: string;
|
|
17
|
+
meta: M;
|
|
18
|
+
totalCount?: number;
|
|
19
|
+
};
|
|
20
|
+
export type PaginatedRequest = {
|
|
21
|
+
limit?: number;
|
|
22
|
+
offset?: number;
|
|
23
|
+
};
|
|
24
|
+
export type Requester = {
|
|
25
|
+
lang: string;
|
|
26
|
+
roles: AppRoles[];
|
|
27
|
+
actions: TopLevelActions[];
|
|
28
|
+
tenantId: string;
|
|
29
|
+
tenantLang: string;
|
|
30
|
+
userAgent?: string;
|
|
31
|
+
source?: string;
|
|
32
|
+
userId: string;
|
|
33
|
+
isApi: boolean;
|
|
34
|
+
};
|
|
35
|
+
export type Option = {
|
|
36
|
+
value: string | number;
|
|
37
|
+
label: string;
|
|
38
|
+
color?: string;
|
|
39
|
+
};
|
|
40
|
+
export declare enum Region {
|
|
41
|
+
euWest1 = "eu-west-1"
|
|
42
|
+
}
|
|
43
|
+
export type ErrorResponse = {
|
|
44
|
+
message?: string;
|
|
45
|
+
data?: unknown;
|
|
46
|
+
};
|
|
47
|
+
export type MultiLangValue = {
|
|
48
|
+
key?: string;
|
|
49
|
+
} & {
|
|
50
|
+
[languageCode: string]: string;
|
|
51
|
+
};
|
|
52
|
+
export type CognitoInfo = {
|
|
53
|
+
userPoolId: string;
|
|
54
|
+
appClientId: string;
|
|
55
|
+
region: Region;
|
|
56
|
+
};
|
|
57
|
+
export type SearchPermissions = {
|
|
58
|
+
users: string[];
|
|
59
|
+
roles: AppRoles[];
|
|
60
|
+
};
|
|
61
|
+
export type PhoneNumberValue = {
|
|
62
|
+
country: string;
|
|
63
|
+
e164: string;
|
|
64
|
+
international: string;
|
|
65
|
+
national: string;
|
|
66
|
+
};
|
|
67
|
+
export type PhoneNumberRawValue = {
|
|
68
|
+
defaultCountry?: string;
|
|
69
|
+
input: string;
|
|
70
|
+
};
|
|
71
|
+
export type LinkValue = {
|
|
72
|
+
text?: string;
|
|
73
|
+
url: string;
|
|
74
|
+
};
|
|
75
|
+
export type Document = {
|
|
76
|
+
type: string;
|
|
77
|
+
displayName: string;
|
|
78
|
+
file: AttachmentValue;
|
|
79
|
+
};
|
|
80
|
+
export type AttachmentValue = {
|
|
81
|
+
contentType: string;
|
|
82
|
+
fileName: string;
|
|
83
|
+
id: string;
|
|
84
|
+
previewSrc?: string;
|
|
85
|
+
size: number;
|
|
86
|
+
uploadedAt: string;
|
|
87
|
+
uploadedBy: string;
|
|
88
|
+
url: string;
|
|
89
|
+
descriptions?: string | MultiLangValue;
|
|
90
|
+
};
|
|
91
|
+
export type VatLayerResponse = {
|
|
92
|
+
vatNumber: string;
|
|
93
|
+
} & ({
|
|
94
|
+
formatValid: false;
|
|
95
|
+
viesValid: false;
|
|
96
|
+
} | {
|
|
97
|
+
formatValid: true;
|
|
98
|
+
viesValid: boolean;
|
|
99
|
+
countryCode: string;
|
|
100
|
+
name: string;
|
|
101
|
+
addressLines: string[];
|
|
102
|
+
});
|
|
103
|
+
export type VatValidationResponse = {
|
|
104
|
+
vatNumber: string;
|
|
105
|
+
formatValid?: boolean;
|
|
106
|
+
countryCode?: string;
|
|
107
|
+
} & ({
|
|
108
|
+
viesValid: false;
|
|
109
|
+
} | {
|
|
110
|
+
viesValid: true;
|
|
111
|
+
name?: string;
|
|
112
|
+
normalizedAddress?: LocationValue;
|
|
113
|
+
officialAddress?: string[];
|
|
114
|
+
});
|
|
115
|
+
export type VatValidationRequest = {
|
|
116
|
+
defaultCountry?: string;
|
|
117
|
+
input: string;
|
|
118
|
+
};
|
|
119
|
+
export type CurrencyLayerResponse = {
|
|
120
|
+
conversionRate: number;
|
|
121
|
+
targetCurrency: string;
|
|
122
|
+
sourceCurrency: string;
|
|
123
|
+
};
|
|
124
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +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,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI;IAChC,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,CAAC,CAAC;IACR,UAAU,CA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B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,CACA;IAAE,SAAS,EAAE,KAAK,CAAA;CAAE,GACpB;IACE,SAAS,EAAE,IAAI,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
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Region = void 0;
|
|
4
|
+
var Region;
|
|
5
|
+
(function (Region) {
|
|
6
|
+
Region["euWest1"] = "eu-west-1";
|
|
7
|
+
})(Region = exports.Region || (exports.Region = {}));
|
|
8
|
+
//# sourceMappingURL=types.js.map
|
package/lib/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
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 VatLayerResponse = { vatNumber: string } & (\n | { formatValid: false; viesValid: false }\n | {\n formatValid: true;\n viesValid: boolean;\n countryCode: string;\n name: string;\n addressLines: string[];\n }\n);\n\nexport type VatValidationResponse = {\n vatNumber: string;\n formatValid?: boolean;\n countryCode?: string;\n} & (\n | { viesValid: false }\n | {\n viesValid: true;\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
|
@@ -19,7 +19,8 @@ export enum TopLevelActions {
|
|
|
19
19
|
LeasingContractsExport = 'leasing:contracts:export',
|
|
20
20
|
LeasingDebtorsExport = 'leasing:debtors:export',
|
|
21
21
|
MarketBrowse = 'market:browse',
|
|
22
|
-
|
|
22
|
+
MarketInsights = 'insights:market',
|
|
23
|
+
VehicleInsights = 'insights:vehicle',
|
|
23
24
|
SettingsAll = 'settings:*',
|
|
24
25
|
VehicleCreate = 'vehicle:create',
|
|
25
26
|
TrackAndTraceDevices = 'tt:devices:*',
|