@bisondesk/commons-sdk 1.0.239 → 1.0.242

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.
@@ -0,0 +1,35 @@
1
+ export type GPSCoord = {
2
+ lat: number;
3
+ lon: number;
4
+ };
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
+
15
+ export type RoutesRequest = {
16
+ origin: LocationValue;
17
+ destination: LocationValue;
18
+ };
19
+
20
+ export enum RouteLabel {
21
+ Unspecified = 'ROUTE_LABEL_UNSPECIFIED',
22
+ Default = 'DEFAULT_ROUTE',
23
+ DefaultAlternate = 'DEFAULT_ROUTE_ALTERNATE',
24
+ FuelEfficient = 'FUEL_EFFICIENT',
25
+ }
26
+
27
+ export type Route = {
28
+ duration: string;
29
+ distanceMeters: number;
30
+ routeLabels: RouteLabel[];
31
+ };
32
+
33
+ export type RoutesResponse = {
34
+ routes: Route[];
35
+ };
package/src/messages.ts CHANGED
@@ -42,6 +42,7 @@ export type TemplatedEmailRequest = {
42
42
  source: EmailAddress;
43
43
  subject: string;
44
44
  template: string;
45
+ attachments?: AttachmentValue[];
45
46
  };
46
47
 
47
48
  export type EmailRequest = {
package/src/types.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import { AppRoles } from './constants';
2
+ import { LocationValue } from './locations';
3
+ export { GPSCoord, LocationValue } from './locations';
2
4
 
3
5
  export type PaginatedList<T, M = {}> = {
4
6
  results: T[];
@@ -6,6 +8,11 @@ export type PaginatedList<T, M = {}> = {
6
8
  meta: M;
7
9
  };
8
10
 
11
+ export type PaginationRequest = {
12
+ limit: number;
13
+ offset: number;
14
+ };
15
+
9
16
  export type NextList<T, M = {}> = {
10
17
  results: T[];
11
18
  nextToken?: string;
@@ -68,18 +75,6 @@ export type PhoneNumberRawValue = {
68
75
  input: string;
69
76
  };
70
77
 
71
- export type LocationValue = {
72
- addressLine1?: string;
73
- addressLine2?: string;
74
- city?: string;
75
- country: string;
76
- postalCode?: string;
77
- gps?: {
78
- lat: number;
79
- lon: number;
80
- };
81
- };
82
-
83
78
  export type LinkValue = {
84
79
  text?: string;
85
80
  url: string;
@@ -132,3 +127,9 @@ export type VatValidationRequest = {
132
127
  defaultCountry?: string;
133
128
  input: string;
134
129
  };
130
+
131
+ export type CurrencyLayerResponse = {
132
+ conversionRate: number;
133
+ targetCurrency: string;
134
+ sourceCurrency: string;
135
+ };