@bisondesk/commons-sdk 1.0.257 → 1.0.259
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 +13 -1
- package/lib/cjs/constants.js.map +1 -1
- package/lib/cjs/types.js.map +1 -1
- package/lib/constants.js +13 -1
- package/lib/constants.js.map +1 -1
- package/lib/esm/constants.js +12 -0
- package/lib/esm/constants.js.map +1 -1
- package/lib/esm/types.js.map +1 -1
- package/lib/tsconfig.cjs.tsbuildinfo +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/types/becris.d.ts +4 -4
- package/lib/types/becris.d.ts.map +1 -1
- package/lib/types/constants.d.ts +12 -1
- package/lib/types/constants.d.ts.map +1 -1
- package/lib/types/discussions.d.ts +7 -7
- package/lib/types/discussions.d.ts.map +1 -1
- package/lib/types/errors.d.ts +1 -1
- package/lib/types/errors.d.ts.map +1 -1
- package/lib/types/exact.d.ts +1 -1
- package/lib/types/exact.d.ts.map +1 -1
- package/lib/types/insurance.d.ts +4 -4
- package/lib/types/insurance.d.ts.map +1 -1
- package/lib/types/locations.d.ts +5 -5
- package/lib/types/locations.d.ts.map +1 -1
- package/lib/types/messages.d.ts +7 -7
- package/lib/types/messages.d.ts.map +1 -1
- package/lib/types/notifications.d.ts +7 -7
- package/lib/types/notifications.d.ts.map +1 -1
- package/lib/types/pdf-gen.d.ts +7 -7
- package/lib/types/pdf-gen.d.ts.map +1 -1
- package/lib/types/storage.d.ts +11 -11
- package/lib/types/storage.d.ts.map +1 -1
- package/lib/types/types.d.ts +21 -20
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/package.json +1 -1
- package/src/constants.ts +12 -0
- package/src/types.ts +2 -1
- package/tsconfig.tsbuildinfo +1 -1
package/lib/types/locations.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type GPSCoord = {
|
|
2
2
|
lat: number;
|
|
3
3
|
lon: number;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export type LocationValue = {
|
|
6
6
|
addressLine1?: string;
|
|
7
7
|
addressLine2?: string;
|
|
8
8
|
city?: string;
|
|
@@ -10,7 +10,7 @@ export declare type LocationValue = {
|
|
|
10
10
|
postalCode?: string;
|
|
11
11
|
gps?: GPSCoord;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type RoutesRequest = {
|
|
14
14
|
origin: LocationValue;
|
|
15
15
|
destination: LocationValue;
|
|
16
16
|
};
|
|
@@ -20,12 +20,12 @@ export declare enum RouteLabel {
|
|
|
20
20
|
DefaultAlternate = "DEFAULT_ROUTE_ALTERNATE",
|
|
21
21
|
FuelEfficient = "FUEL_EFFICIENT"
|
|
22
22
|
}
|
|
23
|
-
export
|
|
23
|
+
export type Route = {
|
|
24
24
|
duration: string;
|
|
25
25
|
distanceMeters: number;
|
|
26
26
|
routeLabels: RouteLabel[];
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type RoutesResponse = {
|
|
29
29
|
routes: Route[];
|
|
30
30
|
};
|
|
31
31
|
export declare const isEUCountry: (country: string) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locations.d.ts","sourceRoot":"/","sources":["locations.ts"],"names":[],"mappings":"AAAA,
|
|
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;CACb,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"}
|
package/lib/types/messages.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { AttachmentValue } from './types';
|
|
2
|
-
export
|
|
2
|
+
export type EmailAddress = {
|
|
3
3
|
name?: string;
|
|
4
4
|
email: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type EmailDestination = EmailAddress & {
|
|
7
7
|
organizationId?: string;
|
|
8
8
|
contactId?: string;
|
|
9
9
|
addressType: 'TO' | 'CC' | 'BCC';
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type EmailContent = {
|
|
12
12
|
subject: string;
|
|
13
13
|
body: {
|
|
14
14
|
text?: string;
|
|
15
15
|
html?: string;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type EmailMessage = {
|
|
19
19
|
id: string;
|
|
20
20
|
sentAt: string;
|
|
21
21
|
sentBy: string;
|
|
@@ -25,11 +25,11 @@ export declare type EmailMessage = {
|
|
|
25
25
|
replyTo?: EmailAddress;
|
|
26
26
|
destinations: EmailDestination[];
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type EmailMessageEvent = {
|
|
29
29
|
tenantId: string;
|
|
30
30
|
message: EmailMessage;
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export type TemplatedEmailRequest = {
|
|
33
33
|
data: Record<string, unknown>;
|
|
34
34
|
destinations: EmailDestination[];
|
|
35
35
|
replyTo?: EmailAddress;
|
|
@@ -38,7 +38,7 @@ export declare type TemplatedEmailRequest = {
|
|
|
38
38
|
template: string;
|
|
39
39
|
attachments?: AttachmentValue[];
|
|
40
40
|
};
|
|
41
|
-
export
|
|
41
|
+
export type EmailRequest = {
|
|
42
42
|
references?: string[] | string;
|
|
43
43
|
inReplyTo?: string;
|
|
44
44
|
destinations: EmailDestination[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"/","sources":["messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,
|
|
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,MAA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
|
|
6
6
|
UNREAD = "unread",
|
|
7
7
|
READ = "read"
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type NewNotificationsEvent<T = unknown> = {
|
|
10
10
|
tenantId: string;
|
|
11
11
|
notifications: NewNotification<T>[];
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
type BaseNotification<T = {}> = {
|
|
14
14
|
sourceId: string;
|
|
15
15
|
destinationId: string;
|
|
16
16
|
businessEntityId: BusinessEntityIds;
|
|
@@ -19,23 +19,23 @@ declare type BaseNotification<T = {}> = {
|
|
|
19
19
|
meta: T;
|
|
20
20
|
origin: string;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
23
|
-
export
|
|
22
|
+
export type NewNotification<T = unknown> = BaseNotification<T>;
|
|
23
|
+
export type Notification<T = unknown> = BaseNotification<T> & {
|
|
24
24
|
id: string;
|
|
25
25
|
createdAt: string;
|
|
26
26
|
visibility: NotificationVisibility;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type NotificationReadUpdates = {
|
|
29
29
|
notificationIds: string[] | undefined;
|
|
30
30
|
origin?: GroupableNotificationOrigin;
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export type NotificationsInfo = {
|
|
33
33
|
unreadCount: number;
|
|
34
34
|
unseen: boolean;
|
|
35
35
|
latestSeenAt?: string;
|
|
36
36
|
latestNotificationAt?: string;
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type NotificationsQuery = {
|
|
39
39
|
limit?: number;
|
|
40
40
|
unreadOnly?: boolean;
|
|
41
41
|
nextToken?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"/","sources":["notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,oBAAY,2BAA2B;IACrC,OAAO,YAAY;CACpB;AACD,oBAAY,sBAAsB;IAChC,MAAM,WAAW;IACjB,IA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AC;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"}
|
package/lib/types/pdf-gen.d.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { BusinessEntityIds } from './constants';
|
|
2
2
|
import { AttachmentValue } from './types';
|
|
3
|
-
export
|
|
3
|
+
export type TemplateData = {
|
|
4
4
|
[key: string]: unknown;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type NewPdfTemplateGroup = {
|
|
7
7
|
exampleData?: TemplateData;
|
|
8
8
|
title: string;
|
|
9
9
|
id: string;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type PdfTemplateGroup = NewPdfTemplateGroup & {
|
|
12
12
|
modifiedAt: string;
|
|
13
13
|
modifiedBy: string;
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
type BasePdfTemplate = {
|
|
16
16
|
branch: string;
|
|
17
17
|
docx: AttachmentValue;
|
|
18
18
|
groupId: string;
|
|
19
19
|
language: string;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type PdfTemplate = BasePdfTemplate & {
|
|
22
22
|
id: string;
|
|
23
23
|
modifiedAt: string;
|
|
24
24
|
modifiedBy: string;
|
|
25
25
|
pdf: AttachmentValue;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type NewPdfTemplate = BasePdfTemplate & {
|
|
28
28
|
id?: string;
|
|
29
29
|
};
|
|
30
|
-
export
|
|
30
|
+
export type GeneratePdfEvent = {
|
|
31
31
|
branch: string;
|
|
32
32
|
businessEntityId: BusinessEntityIds;
|
|
33
33
|
data: TemplateData;
|
|
@@ -1 +1 @@
|
|
|
1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C;IACpC,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
package/lib/types/storage.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type Joi from 'joi';
|
|
2
2
|
import { Requester } from './types';
|
|
3
|
-
export
|
|
3
|
+
export type UploadInfo = {
|
|
4
4
|
id: string;
|
|
5
5
|
uploadUrl: string;
|
|
6
6
|
downloadPath: string;
|
|
@@ -9,12 +9,12 @@ export declare type UploadInfo = {
|
|
|
9
9
|
[name: string]: string;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type VideoDownloadInfo = {
|
|
13
13
|
url: string;
|
|
14
14
|
quality: string;
|
|
15
15
|
size: number;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type VideoInfo = {
|
|
18
18
|
status: 'SUCCESS' | 'PROCESSING' | 'ERROR';
|
|
19
19
|
downloads: VideoDownloadInfo[];
|
|
20
20
|
id: string;
|
|
@@ -23,36 +23,36 @@ export declare enum UploadProviders {
|
|
|
23
23
|
Vimeo = "vimeo",
|
|
24
24
|
S3 = "s3"
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
type BaseUploadUrlRequest = {
|
|
27
27
|
contentType: string;
|
|
28
28
|
};
|
|
29
|
-
export
|
|
29
|
+
export type VimeoUploadRequest = BaseUploadUrlRequest & {
|
|
30
30
|
size: number;
|
|
31
31
|
name: string;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type S3UploadRequest = BaseUploadUrlRequest & {
|
|
34
34
|
shared: boolean;
|
|
35
35
|
fileName: string;
|
|
36
36
|
businessEntityId: string;
|
|
37
37
|
};
|
|
38
|
-
export
|
|
39
|
-
export
|
|
38
|
+
export type UploadUrlRequest<Provider extends UploadProviders> = Provider extends UploadProviders.Vimeo ? VimeoUploadRequest : Provider extends UploadProviders.S3 ? S3UploadRequest : {};
|
|
39
|
+
export type UploadProvider = {
|
|
40
40
|
validationSchema: Joi.ObjectSchema<any>;
|
|
41
41
|
getVideoListInfo: (requester: Requester, videoIds: string[]) => Promise<VideoInfo[]>;
|
|
42
42
|
getUploadInfo(requester: Requester, request: UploadUrlRequest<UploadProviders>): Promise<UploadInfo>;
|
|
43
43
|
};
|
|
44
|
-
export
|
|
44
|
+
export type UploadProvidersDefinition = {
|
|
45
45
|
[key in UploadProviders]: UploadProvider;
|
|
46
46
|
};
|
|
47
47
|
export declare enum MediaExportResolution {
|
|
48
48
|
Low = "low",
|
|
49
49
|
High = "high"
|
|
50
50
|
}
|
|
51
|
-
export
|
|
51
|
+
export type MediaExportRequest = {
|
|
52
52
|
urls: string[];
|
|
53
53
|
resolution?: MediaExportResolution;
|
|
54
54
|
};
|
|
55
|
-
export
|
|
55
|
+
export type MediaExportEvent = {
|
|
56
56
|
s3Keys: string[];
|
|
57
57
|
outputId: string;
|
|
58
58
|
tenantId: string;
|
|
@@ -1 +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,
|
|
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,EA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,GACzC,OAAO,CAAC,UAAU,CAAC,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;KACrC,GAAG,IAAI,eAAe,GAAG,cAAc;CACzC,CAAC;AAEF,oBAAY,qBAAqB;IAC/B,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,CAAC,EAAE,qBAAqB,CAAC;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"}
|
package/lib/types/types.d.ts
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { AppRoles } from './constants';
|
|
1
|
+
import { AppRoles, TopLevelActions } from './constants';
|
|
2
2
|
import { LocationValue } from './locations';
|
|
3
3
|
export { GPSCoord, LocationValue } from './locations';
|
|
4
|
-
export
|
|
4
|
+
export type PaginatedList<T, M = {}> = {
|
|
5
5
|
results: T[];
|
|
6
6
|
totalCount: number;
|
|
7
7
|
meta: M;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type PaginationRequest = {
|
|
10
10
|
limit: number;
|
|
11
11
|
offset: number;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type NextList<T, M = {}> = {
|
|
14
14
|
results: T[];
|
|
15
15
|
nextToken?: string;
|
|
16
16
|
meta: M;
|
|
17
17
|
totalCount?: number;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type PaginatedRequest = {
|
|
20
20
|
limit?: number;
|
|
21
21
|
offset?: number;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type Requester = {
|
|
24
24
|
lang: string;
|
|
25
25
|
roles: AppRoles[];
|
|
26
|
+
actions: TopLevelActions[];
|
|
26
27
|
tenantId: string;
|
|
27
28
|
tenantLang: string;
|
|
28
29
|
userAgent?: string;
|
|
@@ -30,7 +31,7 @@ export declare type Requester = {
|
|
|
30
31
|
userId: string;
|
|
31
32
|
isApi: boolean;
|
|
32
33
|
};
|
|
33
|
-
export
|
|
34
|
+
export type Option = {
|
|
34
35
|
value: string | number;
|
|
35
36
|
label: string;
|
|
36
37
|
color?: string;
|
|
@@ -38,44 +39,44 @@ export declare type Option = {
|
|
|
38
39
|
export declare enum Region {
|
|
39
40
|
euWest1 = "eu-west-1"
|
|
40
41
|
}
|
|
41
|
-
export
|
|
42
|
+
export type ErrorResponse = {
|
|
42
43
|
message?: string;
|
|
43
44
|
data?: unknown;
|
|
44
45
|
};
|
|
45
|
-
export
|
|
46
|
+
export type MultiLangValue = {
|
|
46
47
|
key?: string;
|
|
47
48
|
} & {
|
|
48
49
|
[languageCode: string]: string;
|
|
49
50
|
};
|
|
50
|
-
export
|
|
51
|
+
export type CognitoInfo = {
|
|
51
52
|
userPoolId: string;
|
|
52
53
|
appClientId: string;
|
|
53
54
|
region: Region;
|
|
54
55
|
};
|
|
55
|
-
export
|
|
56
|
+
export type SearchPermissions = {
|
|
56
57
|
users: string[];
|
|
57
58
|
roles: AppRoles[];
|
|
58
59
|
};
|
|
59
|
-
export
|
|
60
|
+
export type PhoneNumberValue = {
|
|
60
61
|
country: string;
|
|
61
62
|
e164: string;
|
|
62
63
|
international: string;
|
|
63
64
|
national: string;
|
|
64
65
|
};
|
|
65
|
-
export
|
|
66
|
+
export type PhoneNumberRawValue = {
|
|
66
67
|
defaultCountry?: string;
|
|
67
68
|
input: string;
|
|
68
69
|
};
|
|
69
|
-
export
|
|
70
|
+
export type LinkValue = {
|
|
70
71
|
text?: string;
|
|
71
72
|
url: string;
|
|
72
73
|
};
|
|
73
|
-
export
|
|
74
|
+
export type Document = {
|
|
74
75
|
type: string;
|
|
75
76
|
displayName: string;
|
|
76
77
|
file: AttachmentValue;
|
|
77
78
|
};
|
|
78
|
-
export
|
|
79
|
+
export type AttachmentValue = {
|
|
79
80
|
contentType: string;
|
|
80
81
|
fileName: string;
|
|
81
82
|
id: string;
|
|
@@ -86,7 +87,7 @@ export declare type AttachmentValue = {
|
|
|
86
87
|
url: string;
|
|
87
88
|
descriptions?: string | MultiLangValue;
|
|
88
89
|
};
|
|
89
|
-
export
|
|
90
|
+
export type VatLayerResponse = {
|
|
90
91
|
vatNumber: string;
|
|
91
92
|
} & ({
|
|
92
93
|
formatValid: false;
|
|
@@ -98,7 +99,7 @@ export declare type VatLayerResponse = {
|
|
|
98
99
|
name: string;
|
|
99
100
|
addressLines: string[];
|
|
100
101
|
});
|
|
101
|
-
export
|
|
102
|
+
export type VatValidationResponse = {
|
|
102
103
|
vatNumber: string;
|
|
103
104
|
formatValid?: boolean;
|
|
104
105
|
countryCode?: string;
|
|
@@ -110,11 +111,11 @@ export declare type VatValidationResponse = {
|
|
|
110
111
|
normalizedAddress?: LocationValue;
|
|
111
112
|
officialAddress?: string[];
|
|
112
113
|
});
|
|
113
|
-
export
|
|
114
|
+
export type VatValidationRequest = {
|
|
114
115
|
defaultCountry?: string;
|
|
115
116
|
input: string;
|
|
116
117
|
};
|
|
117
|
-
export
|
|
118
|
+
export type CurrencyLayerResponse = {
|
|
118
119
|
conversionRate: number;
|
|
119
120
|
targetCurrency: string;
|
|
120
121
|
sourceCurrency: string;
|
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,MAAM,aAAa,CAAC;
|
|
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,MA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U,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,CACnD;IAAE,WAAW,EAAE,KAAK,CAAC;IAAC,SAAS,EAAE,KAAK,CAAA;CAAE,GACxC;IACE,WAAW,EAAE,IAAI,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CACJ,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,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.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":";;;AA6CA,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 totalCount: number;\n meta: M;\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
|
@@ -8,6 +8,18 @@ export enum AppRoles {
|
|
|
8
8
|
Commercial = 'commercial',
|
|
9
9
|
Manager = 'manager',
|
|
10
10
|
ParkLogistics = 'park_logistics',
|
|
11
|
+
AppManager = 'app_manager',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export enum TopLevelActions {
|
|
15
|
+
DocumentsBrowse = 'docs:finance:browse',
|
|
16
|
+
LeasingDebtorsView = 'leasing:debtors:view',
|
|
17
|
+
LeasingAdministrate = 'leasing:admin:*',
|
|
18
|
+
LeasingOverduesView = 'leasing:overdues:view',
|
|
19
|
+
MarketBrowse = 'market:browse',
|
|
20
|
+
MarketTrends = 'market:trends',
|
|
21
|
+
SettingsAll = 'settings:*',
|
|
22
|
+
VehicleCreate = 'vehicle:create',
|
|
11
23
|
}
|
|
12
24
|
|
|
13
25
|
//
|
package/src/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppRoles } from './constants';
|
|
1
|
+
import { AppRoles, TopLevelActions } from './constants';
|
|
2
2
|
import { LocationValue } from './locations';
|
|
3
3
|
export { GPSCoord, LocationValue } from './locations';
|
|
4
4
|
|
|
@@ -28,6 +28,7 @@ export type PaginatedRequest = {
|
|
|
28
28
|
export type Requester = {
|
|
29
29
|
lang: string;
|
|
30
30
|
roles: AppRoles[];
|
|
31
|
+
actions: TopLevelActions[];
|
|
31
32
|
tenantId: string;
|
|
32
33
|
tenantLang: string;
|
|
33
34
|
userAgent?: string;
|