@spotto/contract 1.0.69-alpha.2 → 1.0.69-alpha.21

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.
Files changed (110) hide show
  1. package/README.md +33 -33
  2. package/dist/assets/[id]/get.d.ts +17 -0
  3. package/dist/assets/get/query.d.ts +21 -10
  4. package/dist/assets/location/request.d.ts +4 -0
  5. package/dist/assets/summary/index.d.ts +1 -0
  6. package/dist/assets/summary/index.js +1 -0
  7. package/dist/assets/summary/index.js.map +1 -1
  8. package/dist/assets/summary/response.d.ts +7 -0
  9. package/dist/assets/summary/response.js +3 -0
  10. package/dist/assets/summary/response.js.map +1 -0
  11. package/dist/events/constants.d.ts +1 -1
  12. package/dist/events/constants.js +1 -0
  13. package/dist/events/constants.js.map +1 -1
  14. package/dist/events/get/response.d.ts +32 -16
  15. package/dist/fields/constants.d.ts +1 -1
  16. package/dist/fields/constants.js +24 -19
  17. package/dist/fields/constants.js.map +1 -1
  18. package/dist/index.d.ts +2 -0
  19. package/dist/index.js +2 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/integrations/constants.d.ts +21 -0
  22. package/dist/integrations/constants.js +5 -0
  23. package/dist/integrations/constants.js.map +1 -1
  24. package/dist/integrations/index.d.ts +1 -0
  25. package/dist/integrations/index.js +1 -0
  26. package/dist/integrations/index.js.map +1 -1
  27. package/dist/integrations/oneblink/index.d.ts +2 -0
  28. package/dist/integrations/oneblink/index.js +19 -0
  29. package/dist/integrations/oneblink/index.js.map +1 -0
  30. package/dist/integrations/oneblink/patch/index.d.ts +1 -0
  31. package/dist/integrations/oneblink/patch/index.js +18 -0
  32. package/dist/integrations/oneblink/patch/index.js.map +1 -0
  33. package/dist/integrations/oneblink/patch/request.d.ts +7 -0
  34. package/dist/integrations/oneblink/patch/request.js +3 -0
  35. package/dist/integrations/oneblink/patch/request.js.map +1 -0
  36. package/dist/integrations/oneblink/token.d.ts +4 -0
  37. package/dist/integrations/oneblink/token.js +3 -0
  38. package/dist/integrations/oneblink/token.js.map +1 -0
  39. package/dist/locations/constants.d.ts +1 -1
  40. package/dist/locations/constants.js +2 -0
  41. package/dist/locations/constants.js.map +1 -1
  42. package/dist/manifests/get/query.d.ts +3 -2
  43. package/dist/manifests/index.d.ts +1 -0
  44. package/dist/manifests/index.js +1 -0
  45. package/dist/manifests/index.js.map +1 -1
  46. package/dist/manifests/suggestions/index.d.ts +2 -0
  47. package/dist/manifests/suggestions/index.js +19 -0
  48. package/dist/manifests/suggestions/index.js.map +1 -0
  49. package/dist/manifests/suggestions/query.d.ts +5 -0
  50. package/dist/manifests/suggestions/query.js +3 -0
  51. package/dist/manifests/suggestions/query.js.map +1 -0
  52. package/dist/manifests/suggestions/response.d.ts +15 -0
  53. package/dist/manifests/suggestions/response.js +3 -0
  54. package/dist/manifests/suggestions/response.js.map +1 -0
  55. package/dist/organisations/constants.d.ts +0 -1
  56. package/dist/reports.d.ts +38 -0
  57. package/dist/reports.js +3 -0
  58. package/dist/reports.js.map +1 -0
  59. package/dist/shared/index.d.ts +1 -0
  60. package/dist/shared/index.js +1 -0
  61. package/dist/shared/index.js.map +1 -1
  62. package/dist/shared/relative-date.d.ts +17 -0
  63. package/dist/shared/relative-date.js +12 -0
  64. package/dist/shared/relative-date.js.map +1 -0
  65. package/dist/snapshots/[id]/get.d.ts +16 -0
  66. package/dist/snapshots/[id]/get.js +1 -0
  67. package/dist/snapshots/[id]/get.js.map +1 -1
  68. package/dist/snapshots/get/query.d.ts +2 -2
  69. package/dist/snapshots/post/request.d.ts +4 -1
  70. package/dist/snapshots/post/request.js.map +1 -1
  71. package/dist/system/index.d.ts +4 -2
  72. package/dist/types/[id]/get.d.ts +0 -2
  73. package/dist/users/current.d.ts +2 -0
  74. package/dist/views/[id]/index.d.ts +1 -0
  75. package/dist/views/[id]/index.js +18 -0
  76. package/dist/views/[id]/index.js.map +1 -0
  77. package/dist/views/[id]/patch/index.d.ts +2 -0
  78. package/dist/views/[id]/patch/index.js +19 -0
  79. package/dist/views/[id]/patch/index.js.map +1 -0
  80. package/dist/views/[id]/patch/request.d.ts +9 -0
  81. package/dist/views/[id]/patch/request.js +3 -0
  82. package/dist/views/[id]/patch/request.js.map +1 -0
  83. package/dist/views/[id]/patch/response.d.ts +1 -0
  84. package/dist/views/[id]/patch/response.js +3 -0
  85. package/dist/views/[id]/patch/response.js.map +1 -0
  86. package/dist/views/get/index.d.ts +2 -0
  87. package/dist/views/get/index.js +19 -0
  88. package/dist/views/get/index.js.map +1 -0
  89. package/dist/views/get/query.d.ts +12 -0
  90. package/dist/views/get/query.js +3 -0
  91. package/dist/views/get/query.js.map +1 -0
  92. package/dist/views/get/response.d.ts +20 -0
  93. package/dist/views/get/response.js +3 -0
  94. package/dist/views/get/response.js.map +1 -0
  95. package/dist/views/index.d.ts +4 -0
  96. package/dist/views/index.js +21 -0
  97. package/dist/views/index.js.map +1 -0
  98. package/dist/views/post/index.d.ts +2 -0
  99. package/dist/views/post/index.js +19 -0
  100. package/dist/views/post/index.js.map +1 -0
  101. package/dist/views/post/request.d.ts +10 -0
  102. package/dist/views/post/request.js +3 -0
  103. package/dist/views/post/request.js.map +1 -0
  104. package/dist/views/post/response.d.ts +1 -0
  105. package/dist/views/post/response.js +3 -0
  106. package/dist/views/post/response.js.map +1 -0
  107. package/dist/views/shared.d.ts +26 -0
  108. package/dist/views/shared.js +3 -0
  109. package/dist/views/shared.js.map +1 -0
  110. package/package.json +2 -2
package/README.md CHANGED
@@ -1,33 +1,33 @@
1
- # README
2
-
3
- This repository is a source of truth / documentation for the spotto-api.
4
-
5
- The repository consists of a series of typescript classes that document the API contract
6
- between the spotto API and its clients
7
-
8
- ### How do I get set up?
9
-
10
- 1. Clone this repository
11
- 1. yarn install
12
- 1. run 'yarn start' to start a documentation server
13
-
14
- ### Contribution guidelines
15
-
16
- When adding endpoints create a new folder / file for your endpoint.
17
- Fill out file using others as a guide.
18
-
19
- Any response and request shapes should be specified in the /types folder. The documentation server
20
- is sometimes unable to understand more complicated interfaces. In these scenarios please create two
21
- types files, one with a logical working type that can be used by other repositories. The other will
22
- be simply for filling the response server.
23
-
24
- Any documentation specific types files should have the suffix 'Docs' within the same folder. e.g.
25
-
26
- - types
27
- - objects
28
- - objectTypes.ts
29
- - objectTypesDocs.ts
30
-
31
- ### Who do I talk to?
32
-
33
- - Repo owner or admin
1
+ # README
2
+
3
+ This repository is a source of truth / documentation for the spotto-api.
4
+
5
+ The repository consists of a series of typescript classes that document the API contract
6
+ between the spotto API and its clients
7
+
8
+ ### How do I get set up?
9
+
10
+ 1. Clone this repository
11
+ 1. yarn install
12
+ 1. run 'yarn start' to start a documentation server
13
+
14
+ ### Contribution guidelines
15
+
16
+ When adding endpoints create a new folder / file for your endpoint.
17
+ Fill out file using others as a guide.
18
+
19
+ Any response and request shapes should be specified in the /types folder. The documentation server
20
+ is sometimes unable to understand more complicated interfaces. In these scenarios please create two
21
+ types files, one with a logical working type that can be used by other repositories. The other will
22
+ be simply for filling the response server.
23
+
24
+ Any documentation specific types files should have the suffix 'Docs' within the same folder. e.g.
25
+
26
+ - types
27
+ - objects
28
+ - objectTypes.ts
29
+ - objectTypesDocs.ts
30
+
31
+ ### Who do I talk to?
32
+
33
+ - Repo owner or admin
@@ -29,6 +29,23 @@ export interface ILastLocation {
29
29
  name: string;
30
30
  type?: LocationType;
31
31
  };
32
+ userId?: string;
33
+ dispatch?: {
34
+ location?: {
35
+ id: string;
36
+ name: string;
37
+ path: string;
38
+ };
39
+ withAsset?: {
40
+ id: string;
41
+ name: string;
42
+ };
43
+ data?: Record<string, unknown>;
44
+ time?: number;
45
+ expires?: number;
46
+ snapshotId?: string;
47
+ userId?: string;
48
+ };
32
49
  }
33
50
  export interface ICandidateLocation extends IEmbeddedEntity {
34
51
  type: LocationType;
@@ -1,24 +1,29 @@
1
- import { SearchableSortFields, SortOrders } from '../../shared';
1
+ import { DateCondition, SearchableSortFields, SortOrders } from '../../shared';
2
+ import { LocationStatus } from '../../locations/constants';
2
3
  export declare type AssetSearchField = 'name' | 'tagIds';
3
4
  export declare type AssetEmbedField = 'meta' | 'tagIds' | 'candidateLocations' | 'telemetry' | 'readers';
4
5
  export declare type AssetSortField = SearchableSortFields | 'battery';
5
6
  export declare type AssetBatteryStatus = 'critical' | 'low' | 'ok';
6
- export declare type AssetLocationStatus = 'NEVERSEEN' | 'UNKNOWN' | 'HOME' | 'AWAY' | 'ROAMING' | 'MAP';
7
7
  declare type _CustomFieldsAssetFilterBase = {
8
8
  id: string;
9
9
  };
10
- declare type CustomFieldsAssetFilterValue = _CustomFieldsAssetFilterBase & {
10
+ export declare type CustomFieldsAssetFilterValue = _CustomFieldsAssetFilterBase & {
11
11
  values: any[];
12
12
  };
13
- declare type CustomFieldsAssetFilterDateRange = _CustomFieldsAssetFilterBase & {
14
- from: string;
15
- to: string;
13
+ export declare type CustomFieldsAssetFilterDateCondition = _CustomFieldsAssetFilterBase & {
14
+ conditions: DateCondition[];
16
15
  };
17
- export declare type CustomFieldsAssetFilter = CustomFieldsAssetFilterValue | CustomFieldsAssetFilterDateRange;
16
+ export declare type CustomFieldsAssetFilterNumberRange = _CustomFieldsAssetFilterBase & {
17
+ from: number;
18
+ to: number;
19
+ };
20
+ export declare type CustomFieldsAssetFilter = CustomFieldsAssetFilterValue | CustomFieldsAssetFilterDateCondition | CustomFieldsAssetFilterNumberRange;
18
21
  export declare type CustomFieldValues = {
19
22
  values?: Array<CustomFieldsAssetFilterValue>;
20
- dateRanges?: Array<CustomFieldsAssetFilterDateRange>;
21
- dateTimeRanges?: Array<CustomFieldsAssetFilterDateRange>;
23
+ integerRanges?: Array<CustomFieldsAssetFilterNumberRange>;
24
+ decimalRanges?: Array<CustomFieldsAssetFilterNumberRange>;
25
+ dateConditions?: Array<CustomFieldsAssetFilterDateCondition>;
26
+ dateTimeConditions?: Array<CustomFieldsAssetFilterDateCondition>;
22
27
  };
23
28
  export interface AssetFilters {
24
29
  labels?: string[];
@@ -27,7 +32,7 @@ export interface AssetFilters {
27
32
  hasTags?: boolean;
28
33
  hasReported?: boolean;
29
34
  hasGeolocationState?: boolean;
30
- locationStatus?: Array<AssetLocationStatus>;
35
+ locationStatus?: Array<LocationStatus>;
31
36
  visiting?: boolean;
32
37
  battery?: AssetBatteryStatus;
33
38
  search?: string;
@@ -42,6 +47,11 @@ export interface AssetFilters {
42
47
  customFieldValues?: CustomFieldValues;
43
48
  locationWithIds?: string[];
44
49
  manifestIds?: string[];
50
+ supportsWith?: boolean;
51
+ withAsset?: boolean;
52
+ createdAt?: DateCondition[];
53
+ updatedAt?: DateCondition[];
54
+ lastSeen?: DateCondition[];
45
55
  }
46
56
  export interface GetAssetsQuery extends AssetFilters {
47
57
  page?: number;
@@ -49,5 +59,6 @@ export interface GetAssetsQuery extends AssetFilters {
49
59
  sort?: AssetSortField;
50
60
  sortOrder?: SortOrders;
51
61
  embed?: Array<AssetEmbedField>;
62
+ timezone?: string;
52
63
  }
53
64
  export {};
@@ -7,4 +7,8 @@ export interface UpdateAssetsLocationRequest {
7
7
  readerId?: string;
8
8
  timestamp?: number;
9
9
  withAssetId?: string;
10
+ dispatchLocationId?: string;
11
+ dispatchWithAssetId?: string;
12
+ dispatchData?: Record<string, unknown>;
13
+ dispatchExpires?: number;
10
14
  }
@@ -1 +1,2 @@
1
1
  export * from './summary';
2
+ export * from './response';
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./summary"), exports);
18
+ __exportStar(require("./response"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/assets/summary/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/assets/summary/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,6CAA0B"}
@@ -0,0 +1,7 @@
1
+ import { GetAssetsQuery } from '../get/query';
2
+ import { AssetSummaryItem } from './summary';
3
+ export interface GetAssetsSummaryResponse {
4
+ query: GetAssetsQuery | null;
5
+ total: number;
6
+ items: AssetSummaryItem[];
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/assets/summary/response.ts"],"names":[],"mappings":""}
@@ -4,6 +4,6 @@ export declare type AssetCrudEventType = 'AssetCreated' | 'AssetUpdated' | 'Asse
4
4
  export declare type LocationCrudEventType = 'LocationCreated' | 'LocationUpdated' | 'LocationDeleted';
5
5
  export declare type ReaderCrudEventType = 'ReaderCreated' | 'ReaderUpdated' | 'ReaderDeleted';
6
6
  export declare type SnapshotCrudEventType = 'SnapshotCreated' | 'SnapshotDeleted';
7
- export declare type SlateEventType = 'ReaderArrived' | 'ReaderExited' | 'Arrived' | 'Moved' | 'Exited' | 'ReaderOnline' | 'ReaderOffline';
7
+ export declare type SlateEventType = 'ReaderArrived' | 'ReaderExited' | 'Arrived' | 'Moved' | 'Exited' | 'ReaderOnline' | 'ReaderOffline' | 'AssetDispatch';
8
8
  export declare type EventType = SlateEventType | AssetCrudEventType | LocationCrudEventType | ReaderCrudEventType | SnapshotCrudEventType | 'UserSearch' | 'WorkflowActionExecuted';
9
9
  export declare const EVENT_TYPES: EventType[];
@@ -16,6 +16,7 @@ exports.EVENT_TYPES = [
16
16
  'Exited',
17
17
  'ReaderOnline',
18
18
  'ReaderOffline',
19
+ 'AssetDispatch',
19
20
  'AssetCreated',
20
21
  'AssetUpdated',
21
22
  'AssetDeleted',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/events/constants.ts"],"names":[],"mappings":";;;AACa,QAAA,qBAAqB,GAA0B;IAC1D,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;CACP,CAAA;AAqCY,QAAA,WAAW,GAAgB;IACtC,eAAe;IACf,cAAc;IACd,SAAS;IACT,OAAO;IACP,QAAQ;IACR,cAAc;IACd,eAAe;IACf,cAAc;IACd,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,YAAY;IACZ,wBAAwB;CACzB,CAAA"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/events/constants.ts"],"names":[],"mappings":";;;AACa,QAAA,qBAAqB,GAA0B;IAC1D,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;CACP,CAAA;AAsCY,QAAA,WAAW,GAAgB;IACtC,eAAe;IACf,cAAc;IACd,SAAS;IACT,OAAO;IACP,QAAQ;IACR,cAAc;IACd,eAAe;IACf,eAAe;IACf,cAAc;IACd,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,YAAY;IACZ,wBAAwB;CACzB,CAAA"}
@@ -6,19 +6,19 @@ import { LocationType } from '../../locations/constants';
6
6
  import { GetSnapshotResponse } from '../../snapshots';
7
7
  import { ExecutedWorkflow } from '../../workflows';
8
8
  import { GetAssetResponse } from '../../assets';
9
- export interface EventLocation extends IEmbeddedEntity {
10
- type: LocationType;
11
- organisation?: IEmbeddedEntity;
12
- }
13
- export interface AssetEventLocation extends Partial<IEmbeddedEntity> {
14
- type: LocationType;
9
+ export interface EventLocation {
10
+ id?: string;
11
+ name?: string;
12
+ type?: LocationType;
15
13
  organisation?: IEmbeddedEntity;
16
- withAsset?: IEmbeddedEntity;
17
14
  locationGPS?: {
18
15
  type: 'Point';
19
16
  coordinates: [number, number];
20
17
  };
21
18
  }
19
+ export interface AssetEventLocation extends EventLocation {
20
+ withAsset?: IEmbeddedEntity;
21
+ }
22
22
  export interface IBaseEvent {
23
23
  id: string;
24
24
  timestamp: number;
@@ -43,9 +43,9 @@ export interface IReaderEventPayload {
43
43
  deviceType?: DeviceType;
44
44
  network?: string;
45
45
  deviceId?: string;
46
- location?: IEmbeddedEntity;
46
+ location?: EventLocation;
47
47
  }
48
- export declare type ISnapshotEventPayload = Pick<GetSnapshotResponse, 'reader' | 'manifest' | 'detectedAssets' | 'sightedTypes' | 'sightedAssets' | 'computed' | 'fields' | 'submitted' | 'created' | 'geolocation'>;
48
+ export declare type ISnapshotEventPayload = Pick<GetSnapshotResponse, 'reader' | 'manifest' | 'detectedAssets' | 'undetectedAssets' | 'sightedTypes' | 'sightedAssets' | 'computed' | 'fields' | 'submitted' | 'created' | 'geolocation' | 'types' | 'type'>;
49
49
  export interface IAssetCrudEvent extends IBaseEvent {
50
50
  type: AssetCrudEventType;
51
51
  asset: GetAssetResponse | IEmbeddedEntity;
@@ -85,32 +85,37 @@ export interface IWorkflowActionExecutedEvent extends IBaseEvent {
85
85
  type: 'WorkflowActionExecuted';
86
86
  workflow: ExecutedWorkflow;
87
87
  }
88
+ export interface IArrivedEventAsset extends IEmbeddedEntity {
89
+ dispatch?: boolean;
90
+ userId?: string;
91
+ dispatchData?: Record<string, unknown>;
92
+ }
88
93
  export interface IArrivedEvent extends IBaseEvent {
89
94
  type: 'Arrived';
90
- asset: IEmbeddedEntity;
91
- location: AssetEventLocation;
95
+ asset: IArrivedEventAsset;
96
+ location?: AssetEventLocation;
92
97
  reader?: IEmbeddedEntity;
93
98
  }
94
99
  export interface IExitedEvent extends IBaseEvent {
95
100
  type: 'Exited';
96
101
  asset: IEmbeddedEntity;
97
- location: AssetEventLocation;
102
+ location?: AssetEventLocation;
98
103
  reader?: IEmbeddedEntity;
99
104
  }
100
105
  export interface IReaderArrivedEvent extends IBaseEvent {
101
106
  type: 'ReaderArrived';
102
- location: EventLocation;
107
+ location?: EventLocation;
103
108
  reader: IEmbeddedEntity;
104
109
  }
105
110
  export interface IReaderExitedEvent extends IBaseEvent {
106
111
  type: 'ReaderExited';
107
- location: EventLocation;
112
+ location?: EventLocation;
108
113
  reader: IEmbeddedEntity;
109
114
  }
110
115
  export interface IMovedEvent extends IBaseEvent {
111
116
  type: 'Moved';
112
117
  asset: IEmbeddedEntity;
113
- location: AssetEventLocation;
118
+ location?: AssetEventLocation;
114
119
  reader?: IEmbeddedEntity;
115
120
  }
116
121
  export interface IReaderOnlineEvent extends IBaseEvent {
@@ -121,7 +126,18 @@ export interface IReaderOfflineEvent extends IBaseEvent {
121
126
  type: 'ReaderOffline';
122
127
  reader: IEmbeddedEntity;
123
128
  }
124
- export declare type GetEventResponse = IAssetCrudEvent | ILocationCrudEvent | IReaderCrudEvent | ISnapshotCrudEvent | IUserSearchEvent | IReaderArrivedEvent | IReaderExitedEvent | IArrivedEvent | IMovedEvent | IExitedEvent | IReaderOnlineEvent | IReaderOfflineEvent | IWorkflowActionExecutedEvent;
129
+ export interface IAssetDispatchEventAsset extends IEmbeddedEntity {
130
+ dispatchUserId?: string;
131
+ dispatchData?: Record<string, unknown>;
132
+ }
133
+ export interface IAssetDispatchEvent extends IBaseEvent {
134
+ type: 'AssetDispatch';
135
+ asset: IAssetDispatchEventAsset;
136
+ locationCurrent?: Partial<IEmbeddedEntity>;
137
+ location?: AssetEventLocation;
138
+ dispatchExpires: number;
139
+ }
140
+ export declare type GetEventResponse = IAssetCrudEvent | ILocationCrudEvent | IReaderCrudEvent | ISnapshotCrudEvent | IUserSearchEvent | IReaderArrivedEvent | IReaderExitedEvent | IArrivedEvent | IMovedEvent | IExitedEvent | IReaderOnlineEvent | IReaderOfflineEvent | IAssetDispatchEvent | IWorkflowActionExecutedEvent;
125
141
  export interface GetEventsResponse {
126
142
  query: GetEventsQuery | null;
127
143
  items: GetEventResponse[];
@@ -1,4 +1,4 @@
1
1
  export declare type FieldDataType = 'STRING' | 'INTEGER' | 'DECIMAL' | 'BOOLEAN' | 'DATE' | 'DATETIME';
2
2
  export declare const FIELD_DATA_TYPES: FieldDataType[];
3
- export declare type FieldInputType = 'SINGLELINE' | 'MULTILINE' | 'LINK' | 'RICHTEXT' | 'DROPDOWN' | 'RADIO' | 'CHECKBOXES' | 'DATE' | 'DATETIME';
3
+ export declare type FieldInputType = 'SINGLELINE' | 'MULTILINE' | 'LINK' | 'RICHTEXT' | 'DROPDOWN' | 'RADIO' | 'CHECKBOXES' | 'DATE' | 'DATETIME' | 'INTEGER' | 'DECIMAL' | 'SWITCH';
4
4
  export declare const FIELD_INPUT_TYPES: FieldInputType[];
@@ -1,23 +1,28 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FIELD_INPUT_TYPES = exports.FIELD_DATA_TYPES = void 0;
4
- exports.FIELD_DATA_TYPES = [
5
- 'STRING',
6
- 'INTEGER',
7
- 'DECIMAL',
8
- 'BOOLEAN',
9
- 'DATE',
10
- 'DATETIME',
11
- ];
12
- exports.FIELD_INPUT_TYPES = [
13
- 'SINGLELINE',
14
- 'MULTILINE',
15
- 'LINK',
16
- 'RICHTEXT',
17
- 'DROPDOWN',
18
- 'RADIO',
19
- 'CHECKBOXES',
20
- 'DATE',
21
- 'DATETIME',
22
- ];
4
+ const dataTypes = {
5
+ STRING: null,
6
+ INTEGER: null,
7
+ DECIMAL: null,
8
+ BOOLEAN: null,
9
+ DATE: null,
10
+ DATETIME: null,
11
+ };
12
+ exports.FIELD_DATA_TYPES = Object.keys(dataTypes);
13
+ const inputTypes = {
14
+ SINGLELINE: null,
15
+ MULTILINE: null,
16
+ LINK: null,
17
+ RICHTEXT: null,
18
+ DROPDOWN: null,
19
+ RADIO: null,
20
+ CHECKBOXES: null,
21
+ DATE: null,
22
+ DATETIME: null,
23
+ INTEGER: null,
24
+ DECIMAL: null,
25
+ SWITCH: null,
26
+ };
27
+ exports.FIELD_INPUT_TYPES = Object.keys(inputTypes);
23
28
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/fields/constants.ts"],"names":[],"mappings":";;;AAQa,QAAA,gBAAgB,GAAoB;IAC/C,QAAQ;IACR,SAAS;IACT,SAAS;IACT,SAAS;IACT,MAAM;IACN,UAAU;CACX,CAAA;AAaY,QAAA,iBAAiB,GAAqB;IACjD,YAAY;IACZ,WAAW;IACX,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;IACP,YAAY;IACZ,MAAM;IACN,UAAU;CACX,CAAA"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/fields/constants.ts"],"names":[],"mappings":";;;AAQA,MAAM,SAAS,GAAqC;IAClD,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;CACf,CAAA;AAEY,QAAA,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAoB,CAAA;AAgBzE,MAAM,UAAU,GAAsC;IACpD,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;CACb,CAAA;AAEY,QAAA,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAqB,CAAA"}
package/dist/index.d.ts CHANGED
@@ -18,3 +18,5 @@ export * from './snapshots';
18
18
  export * from './fields';
19
19
  export * from './workflows';
20
20
  export * from './system';
21
+ export * from './reports';
22
+ export * from './views';
package/dist/index.js CHANGED
@@ -34,4 +34,6 @@ __exportStar(require("./snapshots"), exports);
34
34
  __exportStar(require("./fields"), exports);
35
35
  __exportStar(require("./workflows"), exports);
36
36
  __exportStar(require("./system"), exports);
37
+ __exportStar(require("./reports"), exports);
38
+ __exportStar(require("./views"), exports);
37
39
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,2CAAwB;AACxB,iDAA8B;AAC9B,2CAAwB;AACxB,2CAAwB;AACxB,8CAA2B;AAC3B,6CAA0B;AAC1B,kDAA+B;AAC/B,4CAAyB;AACzB,0CAAuB;AACvB,yCAAsB;AACtB,8CAA2B;AAC3B,0CAAuB;AACvB,8CAA2B;AAC3B,0CAAuB;AACvB,2CAAwB;AACxB,8CAA2B;AAC3B,2CAAwB;AACxB,8CAA2B;AAC3B,2CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,2CAAwB;AACxB,iDAA8B;AAC9B,2CAAwB;AACxB,2CAAwB;AACxB,8CAA2B;AAC3B,6CAA0B;AAC1B,kDAA+B;AAC/B,4CAAyB;AACzB,0CAAuB;AACvB,yCAAsB;AACtB,8CAA2B;AAC3B,0CAAuB;AACvB,8CAA2B;AAC3B,0CAAuB;AACvB,2CAAwB;AACxB,8CAA2B;AAC3B,2CAAwB;AACxB,8CAA2B;AAC3B,2CAAwB;AACxB,4CAAyB;AACzB,0CAAuB"}
@@ -1,3 +1,4 @@
1
+ import { UpdateOneBlinkSettingsRequest } from './oneblink/patch/request';
1
2
  export interface MQTTDisabled {
2
3
  enabled: false;
3
4
  }
@@ -18,4 +19,24 @@ export declare type MQTTIntegrationDetails = MQTTEnabled | MQTTDisabled;
18
19
  export declare type MQTTSettings = MQTTEnabledWithDetails | MQTTDisabled;
19
20
  export interface Integrations {
20
21
  mqtt?: boolean;
22
+ oneblink?: boolean;
23
+ }
24
+ export declare enum IntegrationType {
25
+ OneBlink = "oneblink"
26
+ }
27
+ export declare type OneBlinkIntegrationDetails = {
28
+ enabled: true;
29
+ accessKey: string;
30
+ } | {
31
+ enabled: false;
32
+ };
33
+ export declare type UpdateIntegrationRequest = UpdateOneBlinkSettingsRequest & {
34
+ type: IntegrationType.OneBlink;
35
+ };
36
+ export declare type UpdateIntegrationResponse = OneBlinkIntegrationDetails;
37
+ export interface GetIntegrationsResponse {
38
+ mqtt: {
39
+ enabled: boolean;
40
+ };
41
+ oneblink: OneBlinkIntegrationDetails;
21
42
  }
@@ -1,3 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IntegrationType = void 0;
4
+ var IntegrationType;
5
+ (function (IntegrationType) {
6
+ IntegrationType["OneBlink"] = "oneblink";
7
+ })(IntegrationType = exports.IntegrationType || (exports.IntegrationType = {}));
3
8
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/integrations/constants.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/integrations/constants.ts"],"names":[],"mappings":";;;AA8BA,IAAY,eAEX;AAFD,WAAY,eAAe;IACzB,wCAAqB,CAAA;AACvB,CAAC,EAFW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAE1B"}
@@ -1,2 +1,3 @@
1
1
  export * from './mqtt';
2
+ export * from './oneblink';
2
3
  export * from './constants';
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./mqtt"), exports);
18
+ __exportStar(require("./oneblink"), exports);
18
19
  __exportStar(require("./constants"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,8CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,6CAA0B;AAC1B,8CAA2B"}
@@ -0,0 +1,2 @@
1
+ export * from './patch';
2
+ export * from './token';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./patch"), exports);
18
+ __exportStar(require("./token"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integrations/oneblink/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,0CAAuB"}
@@ -0,0 +1 @@
1
+ export * from './request';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./request"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/integrations/oneblink/patch/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB"}
@@ -0,0 +1,7 @@
1
+ export declare type UpdateOneBlinkSettingsRequest = {
2
+ enabled: true;
3
+ accessKey: string;
4
+ secretKey: string;
5
+ } | {
6
+ enabled: false;
7
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/integrations/oneblink/patch/request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface GetOneBlinkTokenResponse {
2
+ token: string;
3
+ expiration: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token.js","sourceRoot":"","sources":["../../../src/integrations/oneblink/token.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
1
  export declare type LocationType = 'MOVING' | 'FIXED';
2
2
  export declare const LOCATION_TYPES: LocationType[];
3
- export declare type LocationStatus = 'NEVERSEEN' | 'UNKNOWN' | 'HOME' | 'AWAY' | 'ROAMING' | 'MAP';
3
+ export declare type LocationStatus = 'NEVERSEEN' | 'UNKNOWN' | 'HOME' | 'AWAY' | 'ROAMING' | 'MAP' | 'DISPATCH' | 'WITH';
4
4
  export declare const LOCATION_STATUS: LocationStatus[];
@@ -9,5 +9,7 @@ exports.LOCATION_STATUS = [
9
9
  'AWAY',
10
10
  'ROAMING',
11
11
  'MAP',
12
+ 'DISPATCH',
13
+ 'WITH',
12
14
  ];
13
15
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/locations/constants.ts"],"names":[],"mappings":";;;AACa,QAAA,cAAc,GAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;AASpD,QAAA,eAAe,GAAqB;IAC/C,WAAW;IACX,SAAS;IACT,MAAM;IACN,MAAM;IACN,SAAS;IACT,KAAK;CACN,CAAA"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/locations/constants.ts"],"names":[],"mappings":";;;AACa,QAAA,cAAc,GAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;AAWpD,QAAA,eAAe,GAAqB;IAC/C,WAAW;IACX,SAAS;IACT,MAAM;IACN,MAAM;IACN,SAAS;IACT,KAAK;IACL,UAAU;IACV,MAAM;CACP,CAAA"}
@@ -1,7 +1,8 @@
1
- import { StandardSortFields, SortOrders } from '../../shared';
2
- export declare type ManifestSortField = StandardSortFields;
1
+ import { SearchableSortFields, SortOrders } from '../../shared';
2
+ export declare type ManifestSortField = SearchableSortFields;
3
3
  export declare type ManifestEmbedField = 'meta' | 'full' | 'partial';
4
4
  export interface GetManifestsQuery {
5
+ search?: string;
5
6
  page?: number;
6
7
  limit?: number;
7
8
  sort?: ManifestSortField;
@@ -1,3 +1,4 @@
1
1
  export * from './[id]';
2
2
  export * from './get';
3
3
  export * from './post';
4
+ export * from './suggestions';
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./[id]"), exports);
18
18
  __exportStar(require("./get"), exports);
19
19
  __exportStar(require("./post"), exports);
20
+ __exportStar(require("./suggestions"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/manifests/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,wCAAqB;AACrB,yCAAsB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/manifests/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,wCAAqB;AACrB,yCAAsB;AACtB,gDAA6B"}
@@ -0,0 +1,2 @@
1
+ export * from './query';
2
+ export * from './response';