@spytecgps/nova-orm 1.2.1 → 1.2.3
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/dist/entities/alert.js +0 -3
- package/dist/entities/alert.js.map +1 -1
- package/dist/entities/alertOld.d.ts +27 -0
- package/dist/entities/alertOld.js +135 -0
- package/dist/entities/alertOld.js.map +1 -0
- package/dist/entities/index.d.ts +3 -1
- package/dist/entities/index.js +3 -1
- package/dist/entities/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/repositories/acumatica/getOrderShipmentInternational.d.ts +5 -0
- package/dist/repositories/acumatica/getOrderShipmentInternational.js +23 -0
- package/dist/repositories/acumatica/getOrderShipmentInternational.js.map +1 -0
- package/dist/repositories/acumatica/index.d.ts +9 -1
- package/dist/repositories/acumatica/index.js +14 -0
- package/dist/repositories/acumatica/index.js.map +1 -1
- package/dist/types/acumatica.d.ts +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OrderShipmentInternational } from '../../entities/orderShipmentInternational';
|
|
2
|
+
import { NovaDataSource } from '../../novaDataSource';
|
|
3
|
+
import { GetOrderShipmentInternationalParams } from '../../types/acumatica';
|
|
4
|
+
import { Logger } from '../../types/logger';
|
|
5
|
+
export declare const getOrderShipmentInternational: (novaDataSource: NovaDataSource, params: GetOrderShipmentInternationalParams, logger: Logger) => Promise<OrderShipmentInternational[]>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OrderShipmentInternational } from '../../entities/orderShipmentInternational';
|
|
2
|
+
export const getOrderShipmentInternational = async (novaDataSource, params, logger) => {
|
|
3
|
+
if (!params.filters.imei) {
|
|
4
|
+
logger.warn({ params }, 'AcumaticaRepository::getOrderShipmentInternational - missing required parameters');
|
|
5
|
+
return [];
|
|
6
|
+
}
|
|
7
|
+
// Force the query to run on master or slave
|
|
8
|
+
const dbQueryRunner = novaDataSource.createQueryRunnerFromParams(params);
|
|
9
|
+
return novaDataSource.safeQuery(async (dataSource, queryRunner) => {
|
|
10
|
+
const orderShipmentInternationalRepository = dataSource.getRepository(OrderShipmentInternational);
|
|
11
|
+
const queryBuilder = orderShipmentInternationalRepository
|
|
12
|
+
.createQueryBuilder('orderShipmentInternational')
|
|
13
|
+
.where('LOWER(orderShipmentInternational.imei) = LOWER(:imei)', {
|
|
14
|
+
imei: params.filters.imei,
|
|
15
|
+
});
|
|
16
|
+
if (queryRunner) {
|
|
17
|
+
queryBuilder.setQueryRunner(queryRunner);
|
|
18
|
+
}
|
|
19
|
+
const result = await queryBuilder.getMany();
|
|
20
|
+
return result;
|
|
21
|
+
}, 'AcumaticaRepository::getOrderShipmentInternational', dbQueryRunner);
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=getOrderShipmentInternational.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getOrderShipmentInternational.js","sourceRoot":"","sources":["../../../src/repositories/acumatica/getOrderShipmentInternational.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAA;AAKtF,MAAM,CAAC,MAAM,6BAA6B,GAAG,KAAK,EAChD,cAA8B,EAC9B,MAA2C,EAC3C,MAAc,EACyB,EAAE;IACzC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE;QACxB,MAAM,CAAC,IAAI,CACT,EAAE,MAAM,EAAE,EACV,kFAAkF,CACnF,CAAA;QACD,OAAO,EAAE,CAAA;KACV;IAED,4CAA4C;IAC5C,MAAM,aAAa,GAAG,cAAc,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAA;IAExE,OAAO,cAAc,CAAC,SAAS,CAC7B,KAAK,EACH,UAA0B,EAC1B,WAAyB,EACc,EAAE;QACzC,MAAM,oCAAoC,GAAG,UAAU,CAAC,aAAa,CACnE,0BAA0B,CAC3B,CAAA;QAED,MAAM,YAAY,GAAG,oCAAoC;aACtD,kBAAkB,CAAC,4BAA4B,CAAC;aAChD,KAAK,CAAC,uDAAuD,EAAE;YAC9D,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI;SAC1B,CAAC,CAAA;QAEJ,IAAI,WAAW,EAAE;YACf,YAAY,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;SACzC;QAED,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,OAAO,EAAE,CAAA;QAE3C,OAAO,MAAM,CAAA;IACf,CAAC,EACD,oDAAoD,EACpD,aAAa,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AcumaticaImeiIccidData } from '../../entities';
|
|
2
|
-
import {
|
|
2
|
+
import { OrderShipmentInternational } from '../../entities/orderShipmentInternational';
|
|
3
|
+
import { AmazonDeviceShipmentDetails, GetAcumaticaImeiIccidDataParams, GetAcumaticaShipmentDetailsParams, GetLastAmazonDeviceShipmentDetailsParams, GetOrderShipmentInternationalParams } from '../../types/acumatica';
|
|
3
4
|
import { BaseRepository } from '../baseRepository';
|
|
4
5
|
export declare class AcumaticaRepository extends BaseRepository {
|
|
5
6
|
/**
|
|
@@ -29,4 +30,11 @@ export declare class AcumaticaRepository extends BaseRepository {
|
|
|
29
30
|
* @returns Acumatica shipment details list
|
|
30
31
|
*/
|
|
31
32
|
getAcumaticaShipmentDetails(params: GetAcumaticaShipmentDetailsParams): Promise<AmazonDeviceShipmentDetails[]>;
|
|
33
|
+
/**
|
|
34
|
+
* Get order shipment international
|
|
35
|
+
* @param params containing information to get order shipment international
|
|
36
|
+
* - params.filters.imei IMEI to filter by
|
|
37
|
+
* @returns order shipment international list
|
|
38
|
+
*/
|
|
39
|
+
getOrderShipmentInternational(params: GetOrderShipmentInternationalParams): Promise<OrderShipmentInternational[]>;
|
|
32
40
|
}
|
|
@@ -3,6 +3,7 @@ import { BaseRepository } from '../baseRepository';
|
|
|
3
3
|
import { getAcumaticaImeiIccidData } from './getAcumaticaImeiIccidData';
|
|
4
4
|
import { getAcumaticaShipmentDetails } from './getAcumaticaShipmentDetails';
|
|
5
5
|
import { getLastAcumaticaShipmentDetails } from './getLastAcumaticaShipmentDetails';
|
|
6
|
+
import { getOrderShipmentInternational } from './getOrderShipmentInternational';
|
|
6
7
|
export class AcumaticaRepository extends BaseRepository {
|
|
7
8
|
/**
|
|
8
9
|
* Get Acumatica IMEI/ICCID data
|
|
@@ -49,5 +50,18 @@ export class AcumaticaRepository extends BaseRepository {
|
|
|
49
50
|
this.logger.trace(result, 'AcumaticaRepository::getAcumaticaShipmentDetails result');
|
|
50
51
|
return result;
|
|
51
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Get order shipment international
|
|
55
|
+
* @param params containing information to get order shipment international
|
|
56
|
+
* - params.filters.imei IMEI to filter by
|
|
57
|
+
* @returns order shipment international list
|
|
58
|
+
*/
|
|
59
|
+
async getOrderShipmentInternational(params) {
|
|
60
|
+
this.logger.trace(params, `AcumaticaRepository::getOrderShipmentInternational started with params`);
|
|
61
|
+
const novaDataSource = new NovaDataSource(this.novaDataSourceConfig, this.logger, this.replicaNovaDataSourceConfig);
|
|
62
|
+
const result = await getOrderShipmentInternational(novaDataSource, params, this.logger);
|
|
63
|
+
this.logger.trace(result, 'AcumaticaRepository::getOrderShipmentInternational result');
|
|
64
|
+
return result;
|
|
65
|
+
}
|
|
52
66
|
}
|
|
53
67
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/repositories/acumatica/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/repositories/acumatica/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAQrD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,2BAA2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