@things-factory/operato-hub 4.3.787 → 4.3.789

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.
@@ -4,15 +4,9 @@ module.exports = {
4
4
  useVirtualHostBasedDomain: false,
5
5
  fallbackRoute: '/',
6
6
  subdomainOffset: 2,
7
- port: 4445,
7
+ port: 3000,
8
8
  inspect: '9260',
9
- storage: {
10
- type: 's3',
11
- accessKeyId: 'AKIAUQEOPWEJHCE4MTH4',
12
- secretAccessKey: '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',
13
- bucketName: 'opa-one',
14
- region: 'ap-southeast-1'
15
- },
9
+ //postgres
16
10
  // ormconfig: {
17
11
  // name: 'default',
18
12
  // type: 'postgres',
@@ -24,7 +18,30 @@ module.exports = {
24
18
  // synchronize: false,
25
19
  // logging: true
26
20
  // },
27
-
21
+ //operato
22
+ // ormconfig: {
23
+ // name: 'default',
24
+ // type: 'postgres',
25
+ // database: 'operato',
26
+ // username: 'postgres',
27
+ // password: 'hatio',
28
+ // host: '192.168.0.151',
29
+ // port: 15432,
30
+ // synchronize: false,
31
+ // logging: true
32
+ // },
33
+ //eric2
34
+ // ormconfig: {
35
+ // name: 'default',
36
+ // type: 'postgres',
37
+ // database: 'eric2',
38
+ // username: 'postgres',
39
+ // password: 'hatio',
40
+ // host: '192.168.0.153',
41
+ // port: 15432,
42
+ // synchronize: false,
43
+ // logging: true
44
+ // },
28
45
  // STAGING DATABASE
29
46
  ormconfig: {
30
47
  name: 'default',
@@ -37,34 +54,30 @@ module.exports = {
37
54
  synchronize: false,
38
55
  logging: true
39
56
  },
40
-
57
+ //EMS
41
58
  // ormconfig: {
42
59
  // name: 'default',
43
60
  // type: 'postgres',
44
- // database: 'operato',
61
+ // database: 'EMS',
45
62
  // username: 'postgres',
46
63
  // password: 'hatio',
47
- // host: '192.168.0.153',
64
+ // host: '192.168.0.161',
48
65
  // port: 15432,
49
66
  // synchronize: false,
50
67
  // logging: true
51
68
  // },
52
-
53
- //db izzah
69
+ //db nora
54
70
  // ormconfig: {
55
71
  // name: 'default',
56
72
  // type: 'postgres',
57
- // database: '06072023',
73
+ // database: 'postgres',
58
74
  // username: 'postgres',
59
75
  // password: 'hatio',
60
- // host: '192.168.0.153',
76
+ // host: '192.168.0.36',
61
77
  // port: 15432,
62
78
  // synchronize: true,
63
79
  // logging: true
64
80
  // },
65
- //postgres
66
-
67
- // //ERIC
68
81
  // ormconfig: {
69
82
  // name: 'default',
70
83
  // type: 'postgres',
@@ -76,33 +89,32 @@ module.exports = {
76
89
  // synchronize: true,
77
90
  // logging: true
78
91
  // },
79
-
80
- //eric2
92
+ //db izzah
81
93
  // ormconfig: {
82
94
  // name: 'default',
83
95
  // type: 'postgres',
84
- // database: 'eric2',
96
+ // database: '06072023',
85
97
  // username: 'postgres',
86
98
  // password: 'hatio',
87
99
  // host: '192.168.0.153',
88
100
  // port: 15432,
89
- // synchronize: false,
101
+ // synchronize: true,
90
102
  // logging: true
91
103
  // },
92
-
93
104
  // ormconfig: {
94
105
  // name: 'default',
95
106
  // type: 'postgres',
96
- // database: 'dev2', // dev2
97
- // username: 'postgres',
98
- // password: 'abcd1234',
99
- // host: 'operatov3.cluster-cijhm4n1hbst.ap-southeast-1.rds.amazonaws.com',
100
- // port: 55432,
101
- // synchronize:false,
102
- // logging: false,
107
+ // host: 'a6cf0bb5671f54555985dede599d5a87-649005352.ap-southeast-1.elb.amazonaws.com',
108
+ // port: 15432,
109
+ // database: 'postgres',
110
+ // username: 'operato-hub-app',
111
+ // password: 'a5Z(7|6n$Zti',
112
+ // synchronize: false,
113
+ // logging: true,
103
114
  // connectTimeoutMS: 30000,
104
115
  // extra: { poolSize: 30 }
105
116
  // },
117
+
106
118
  // ormconfig: {
107
119
  // name: 'default',
108
120
  // type: 'postgres',
@@ -116,6 +128,7 @@ module.exports = {
116
128
  // connectTimeoutMS: 30000,
117
129
  // extra: { poolSize: 30 }
118
130
  // },
131
+
119
132
  password: {
120
133
  lowerCase: true,
121
134
  upperCase: false,
@@ -167,11 +180,6 @@ module.exports = {
167
180
  ciphers: 'SSLv3'
168
181
  }
169
182
  },
170
- jobQueue: {
171
- // For JobQueueService/JobWorker (FIFO queue is supported)
172
- queueUrl: 'https://sqs.ap-southeast-5.amazonaws.com/309536469266/operato-job-queue.fifo',
173
- sqsRegion: 'ap-southeast-5'
174
- },
175
183
  sender: 'noreply@hatiolab.com',
176
184
  notification: {
177
185
  // fcm: {
@@ -210,7 +218,8 @@ module.exports = {
210
218
  isUAT: false,
211
219
  application: 'Operato MMS',
212
220
  partnerId: 846025,
213
- partnerKey: 'd34cfd85a603f196a0d74ebe08043280c1a27788bb36bdffd61e7e0bb1c90b64'
221
+ partnerKey: 'd34cfd85a603f196a0d74ebe08043280c1a27788bb36bdffd61e7e0bb1c90b64',
222
+ v2: true
214
223
  },
215
224
  marketplaceIntegrationLazada: {
216
225
  platform: 'lazada',
@@ -219,6 +228,16 @@ module.exports = {
219
228
  appSecret: 'HB3RTNEXHlVSlBr9SmWF8AjbSUT7a825',
220
229
  callback: 'https://maybank.operato-m.com/lazada-callback'
221
230
  },
231
+
232
+ //testinglazada
233
+ // marketplaceIntegrationLazada: {
234
+ // platform: 'lazada',
235
+ // application: 'powrup_bi',
236
+ // appKey: '117890',
237
+ // appSecret: 'tQVllnUa7irAHoNxAwXEVxoP1we1bUjE',
238
+ // callback: 'https://73c5-175-141-30-142.ngrok-free.app/lazada-callback'
239
+ // },
240
+
222
241
  accountingIntegrationXero: {
223
242
  platform: 'xero',
224
243
  application: 'Operato WMS',
@@ -227,23 +246,48 @@ module.exports = {
227
246
  callback: 'http://operato-h.com:3000/callback-xero',
228
247
  hostname: 'http://operato-h.com:3000/'
229
248
  },
230
- lambda: {
231
- region: 'ap-southeast-1',
232
- accessKeyId: 'AKIAUQEOPWEJKL43OMZA',
233
- secretAccessKey: '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'
249
+ lmdIntegrationNinjavan: {
250
+ clientId: 'P8WCEwMo0FHNlPECwTLetwN3diAmt5KF',
251
+ secretKey: '1D0yNZGseOjhxnwri29xmuZiiuRp131L',
252
+ refreshThreshold: 43200
234
253
  },
254
+
255
+ lmdIntegrationEms: { refreshThreshold: 43200 },
256
+
257
+ lmdIntegrationCitylink: { refreshThreshold: 172800000 },
235
258
  awbFileStorage: {
236
259
  type: 's3',
237
- accessKeyId: 'AKIAUQEOPWEJKL43OMZA',
238
- secretAccessKey: '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',
260
+ accessKeyId: 'AKIAUQEOPWEJPXIVER74',
261
+ secretAccessKey: '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',
239
262
  bucketName: 'operato-awb',
240
263
  region: 'ap-southeast-1'
241
264
  },
265
+ lambda: {
266
+ region: 'ap-southeast-1',
267
+ accessKeyId: 'AKIAUQEOPWEJPXIVER74',
268
+ secretAccessKey: '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'
269
+ },
270
+ lambdaMy: {
271
+ region: 'ap-southeast-5',
272
+ accessKeyId: 'AKIAUQEOPWEJHCE4MTH4',
273
+ secretAccessKey: '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'
274
+ },
275
+ lmdIntegrationConfig: {
276
+ version: {
277
+ v1: 'lmdMiddleware',
278
+ v2: 'lmdMiddlewareV2'
279
+ }
280
+ },
242
281
  awsSesEmail: {
243
- accessKeyId: 'AKIAUQEOPWEJKQDJSEOG',
244
- secretAccessKey: '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',
282
+ accessKeyId: 'AKIAUQEOPWEJPXIVER74',
283
+ secretAccessKey: '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',
245
284
  email: 'support@hatio.asia'
246
285
  },
286
+ jobQueue: {
287
+ // For JobQueueService/JobWorker (FIFO queue is supported)
288
+ queueUrl: 'https://sqs.ap-southeast-5.amazonaws.com/309536469266/operato-job-queue.fifo',
289
+ sqsRegion: 'ap-southeast-5'
290
+ },
247
291
  reportApiUrl:
248
292
  'http://k8s-default-operator-2fd6178d98-66c66a0f76c09575.elb.ap-southeast-1.amazonaws.com/rest/report/show_html'
249
293
  }
@@ -18,12 +18,16 @@ api_1.restfulApiRouter.get('/v1/company/get-webhook-details', middlewares_1.busi
18
18
  if (!bizplace)
19
19
  throw new error_util_1.ApiError('E01', 'bizplaceId');
20
20
  const partnerBizplaces = await (0, biz_base_1.getPartnersBizplaces)(bizplace.domain, user, tx);
21
+ const bizplacesIds = partnerBizplaces.map(p => p.id).filter(Boolean);
22
+ if (!bizplacesIds.length) {
23
+ throw new error_util_1.ApiError('E04', 'No partner bizplaces found for the given warehouseBizplaceId');
24
+ }
21
25
  const qb = await tx
22
26
  .getRepository(integration_base_1.Webhook)
23
27
  .createQueryBuilder('webhook')
24
28
  .leftJoinAndSelect('webhook.bizplaces', 'bz')
25
29
  .leftJoinAndSelect('webhook.webhookEvents', 'webhookEvent')
26
- .where('bz.id in (:...bizplacesIds)', { bizplacesIds: partnerBizplaces.map(p => p.id) });
30
+ .where('bz.id in (:...bizplacesIds)', { bizplacesIds });
27
31
  if (webhookId) {
28
32
  qb.andWhere('webhook.id = :webhookId', { webhookId });
29
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"get-webhook-details.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/v1/company/get-webhook-details.ts"],"names":[],"mappings":";;AAAA,6CAAgE;AAChE,uDAAyE;AACzE,oDAAyF;AACzF,gDAA4F;AAC5F,qCAA2D;AAC3D,uEAA0D;AAE1D,sBAAM,CAAC,GAAG,CACR,iCAAiC,EACjC,gCAAkB,EAClB,kCAAoB,EACpB,+BAAiB,EACjB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtB,IAAI;QACF,MAAM,IAAA,uBAAa,GAAE,CAAC,WAAW,CAAC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AE,CAAC,EAAE;oBACT,IAAI,EAAE,EAAE,CAAC,IAAI;oBACb,MAAM,EAAE,EAAE,CAAC,MAAM;oBACjB,GAAG,EAAE,EAAE,CAAC,GAAG;oBACX,SAAS,EAAE,EAAE,CAAC,SAAS;oBACvB,YAAY,EAAE,EAAE,CAAC,YAAY;oBAC7B,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;oBACzC,gBAAgB,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;iBACtE,CAAA;gBACD,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;aACrB;YAED,OAAO,CAAC,IAAI,GAAG;gBACb,IAAI;aACL,CAAA;QACH,CAAC,CAAC,CAAA;KACH;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,YAAY,qBAAQ;YAAE,IAAA,4BAAe,EAAC,OAAO,EAAE,CAAC,CAAC,CAAA;;YACjD,IAAA,qCAAwB,EAAC,OAAO,EAAE,CAAC,CAAC,CAAA;KAC1C;AACH,CAAC,CACF,CAAA"}
1
+ {"version":3,"file":"get-webhook-details.js","sourceRoot":"","sources":["../../../../../../server/routers/api/restful-apis/v1/company/get-webhook-details.ts"],"names":[],"mappings":";;AAAA,6CAAgE;AAChE,uDAAyE;AACzE,oDAAyF;AACzF,gDAA4F;AAC5F,qCAA2D;AAC3D,uEAA0D;AAE1D,sBAAM,CAAC,GAAG,CACR,iCAAiC,EACjC,gCAAkB,EAClB,kCAAoB,EACpB,+BAAiB,EACjB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtB,IAAI;QACF,MAAM,IAAA,uBAAa,GAAE,CAAC,WAAW,CAAC,KAAK,EAAC,EAAE,EAA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AAI,IAAI,GAAG,EAAE,CAAA;YACb,KAAK,MAAM,EAAE,IAAI,MAAM,EAAE;gBACvB,IAAI,SAAS,GAAG,EAAE,CAAA;gBAClB,SAAS,GAAG;oBACV,EAAE,EAAE,EAAE,CAAC,EAAE;oBACT,IAAI,EAAE,EAAE,CAAC,IAAI;oBACb,MAAM,EAAE,EAAE,CAAC,MAAM;oBACjB,GAAG,EAAE,EAAE,CAAC,GAAG;oBACX,SAAS,EAAE,EAAE,CAAC,SAAS;oBACvB,YAAY,EAAE,EAAE,CAAC,YAAY;oBAC7B,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;oBACzC,gBAAgB,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;iBACtE,CAAA;gBACD,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;aACrB;YAED,OAAO,CAAC,IAAI,GAAG;gBACb,IAAI;aACL,CAAA;QACH,CAAC,CAAC,CAAA;KACH;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,YAAY,qBAAQ;YAAE,IAAA,4BAAe,EAAC,OAAO,EAAE,CAAC,CAAC,CAAA;;YACjD,IAAA,qCAAwB,EAAC,OAAO,EAAE,CAAC,CAAC,CAAA;KAC1C;AACH,CAAC,CACF,CAAA"}
@@ -53,6 +53,7 @@ definitions:
53
53
  - 'packing_completed'
54
54
  - 'loading_started'
55
55
  - 'loading_completed'
56
+ - 'delivery_order_completed'
56
57
  - 'inventory_adjusted'
57
58
  - 'dispatch_manifest'
58
59
  partnerBizplaces:
@@ -121,6 +122,7 @@ definitions:
121
122
  - 'packing_completed'
122
123
  - 'loading_started'
123
124
  - 'loading_completed'
125
+ - 'delivery_order_completed'
124
126
  - 'inventory_adjusted'
125
127
  - 'dispatch_manifest'
126
128
  partnerBizplaces:
@@ -174,6 +176,7 @@ paths:
174
176
  - `packing_completed`: triggered when packing worksheet is completed
175
177
  - `loading_started`: triggered when picking is completed for orders that do not need packing
176
178
  - `loading_completed`: triggered when loading for that order is complete
179
+ - `delivery_order_completed`: triggered when delivery order is completed
177
180
  - `inventory_adjusted`: triggered when inventory adjustment is approved
178
181
  - `dispatch_manifest`: triggered when manifest has been dispatched
179
182
  operationId: 'upsertWebhooks'
@@ -253,6 +256,7 @@ paths:
253
256
  - 'packing_completed'
254
257
  - 'loading_started'
255
258
  - 'loading_completed'
259
+ - 'delivery_order_completed'
256
260
  - 'inventory_adjusted'
257
261
  - 'dispatch_manifest'
258
262
  responses:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-hub",
3
- "version": "4.3.787",
3
+ "version": "4.3.789",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -77,23 +77,23 @@
77
77
  "@things-factory/i18n-base": "^4.3.767",
78
78
  "@things-factory/import-ui": "^4.3.770",
79
79
  "@things-factory/import-ui-excel": "^4.3.776",
80
- "@things-factory/integration-accounting": "^4.3.784",
81
- "@things-factory/integration-base": "^4.3.776",
82
- "@things-factory/integration-fulfillment": "^4.3.776",
83
- "@things-factory/integration-lmd": "^4.3.776",
84
- "@things-factory/integration-marketplace": "^4.3.776",
85
- "@things-factory/integration-pos": "^4.3.776",
86
- "@things-factory/integration-powrup": "^4.3.776",
87
- "@things-factory/integration-sellercraft": "^4.3.776",
88
- "@things-factory/integration-sftp": "^4.3.776",
80
+ "@things-factory/integration-accounting": "^4.3.788",
81
+ "@things-factory/integration-base": "^4.3.788",
82
+ "@things-factory/integration-fulfillment": "^4.3.788",
83
+ "@things-factory/integration-lmd": "^4.3.788",
84
+ "@things-factory/integration-marketplace": "^4.3.788",
85
+ "@things-factory/integration-pos": "^4.3.788",
86
+ "@things-factory/integration-powrup": "^4.3.788",
87
+ "@things-factory/integration-sellercraft": "^4.3.788",
88
+ "@things-factory/integration-sftp": "^4.3.788",
89
89
  "@things-factory/lite-menu": "^4.3.770",
90
- "@things-factory/marketplace-base": "^4.3.782",
90
+ "@things-factory/marketplace-base": "^4.3.788",
91
91
  "@things-factory/more-ui": "^4.3.767",
92
92
  "@things-factory/notification": "^4.3.767",
93
93
  "@things-factory/pdf": "^4.3.767",
94
- "@things-factory/product-ui": "^4.3.782",
94
+ "@things-factory/product-ui": "^4.3.788",
95
95
  "@things-factory/resource-ui": "^4.3.770",
96
- "@things-factory/sales-base": "^4.3.784",
96
+ "@things-factory/sales-base": "^4.3.789",
97
97
  "@things-factory/scene-data-transform": "^4.3.767",
98
98
  "@things-factory/scene-excel": "^4.3.767",
99
99
  "@things-factory/scene-firebase": "^4.3.767",
@@ -109,8 +109,8 @@
109
109
  "@things-factory/shell": "^4.3.767",
110
110
  "@things-factory/system-ui": "^4.3.767",
111
111
  "@things-factory/transport-base": "^4.3.767",
112
- "@things-factory/warehouse-base": "^4.3.784",
113
- "@things-factory/worksheet-base": "^4.3.787",
112
+ "@things-factory/warehouse-base": "^4.3.789",
113
+ "@things-factory/worksheet-base": "^4.3.789",
114
114
  "cron-parser": "^4.7.0",
115
115
  "koa2-swagger-ui": "^5.0.2",
116
116
  "swagger-jsdoc": "^5.0.0",
@@ -123,5 +123,5 @@
123
123
  "resolutions": {
124
124
  "core-js": "^3.16.0"
125
125
  },
126
- "gitHead": "dad39e86be326a731ad345afea52bba594d11452"
126
+ "gitHead": "f2c0983c5b5bae151d242f2d0267e800d6be318e"
127
127
  }
@@ -22,13 +22,18 @@ router.get(
22
22
  if (!bizplace) throw new ApiError('E01', 'bizplaceId')
23
23
 
24
24
  const partnerBizplaces: any[] = await getPartnersBizplaces(bizplace.domain, user, tx)
25
+ const bizplacesIds = partnerBizplaces.map(p => p.id).filter(Boolean)
26
+
27
+ if (!bizplacesIds.length) {
28
+ throw new ApiError('E04', 'No partner bizplaces found for the given warehouseBizplaceId')
29
+ }
25
30
 
26
31
  const qb: SelectQueryBuilder<Webhook> = await tx
27
32
  .getRepository(Webhook)
28
33
  .createQueryBuilder('webhook')
29
34
  .leftJoinAndSelect('webhook.bizplaces', 'bz')
30
35
  .leftJoinAndSelect('webhook.webhookEvents', 'webhookEvent')
31
- .where('bz.id in (:...bizplacesIds)', { bizplacesIds: partnerBizplaces.map(p => p.id) })
36
+ .where('bz.id in (:...bizplacesIds)', { bizplacesIds })
32
37
 
33
38
  if (webhookId) {
34
39
  qb.andWhere('webhook.id = :webhookId', { webhookId })