mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-06 05:22:52 +00:00
refactor: update the dependencies
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
import {Bulk} from '@openstapps/api/lib/bulk';
|
||||
import {ConnectorClient as Client} from '@openstapps/api/lib/connectorClient';
|
||||
import {HttpClient} from '@openstapps/api/lib/httpClient';
|
||||
import {SCBulkAddResponse, SCMessage} from '@openstapps/core';
|
||||
import {SCBulkAddResponse, SCMessage, SCThingType} from '@openstapps/core';
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import * as promiseLimit from 'promise-limit';
|
||||
import {MinimalConnector} from '.';
|
||||
@@ -35,7 +35,7 @@ async function runConnector() {
|
||||
let bulk: Bulk<SCMessage>;
|
||||
|
||||
try {
|
||||
bulk = await api.bulk<SCMessage>('message', 'minimal-connector');
|
||||
bulk = await api.bulk<SCMessage>(SCThingType.Message, 'minimal-connector');
|
||||
} catch (err) {
|
||||
logger.error('Couldn\'t open bulk.');
|
||||
throw err;
|
||||
|
||||
11
src/index.ts
11
src/index.ts
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {ConnectorClient as Client} from '@openstapps/api/lib/connectorClient';
|
||||
import {SCMessage} from '@openstapps/core';
|
||||
import {SCMessage, SCThingOriginType, SCThingType} from '@openstapps/core';
|
||||
|
||||
export class MinimalConnector {
|
||||
// Data is mocked inside of getItems()
|
||||
@@ -39,8 +39,9 @@ export class MinimalConnector {
|
||||
origin: {
|
||||
indexed: (new Date()).toISOString(),
|
||||
name: 'minimal connector',
|
||||
type: SCThingOriginType.Remote,
|
||||
},
|
||||
type: 'message',
|
||||
type: SCThingType.Message,
|
||||
uid: '',
|
||||
},
|
||||
{
|
||||
@@ -51,8 +52,9 @@ export class MinimalConnector {
|
||||
origin: {
|
||||
indexed: (new Date()).toISOString(),
|
||||
name: 'minimal connector',
|
||||
type: SCThingOriginType.Remote,
|
||||
},
|
||||
type: 'message',
|
||||
type: SCThingType.Message,
|
||||
uid: '',
|
||||
},
|
||||
{
|
||||
@@ -63,8 +65,9 @@ export class MinimalConnector {
|
||||
origin: {
|
||||
indexed: (new Date()).toISOString(),
|
||||
name: 'minimal connector',
|
||||
type: SCThingOriginType.Remote,
|
||||
},
|
||||
type: 'message',
|
||||
type: SCThingType.Message,
|
||||
uid: '',
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user