@dv4resi/dvss-backend-module-offering-im 0.0.17 → 0.0.19
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/index.d.ts +67 -54
- package/dist/index.js +552 -432
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var common = require('@nestjs/common');
|
|
4
|
-
var
|
|
5
|
-
var path = require('path');
|
|
4
|
+
var dvssBackendModuleDatastore = require('@dv4resi/dvss-backend-module-datastore');
|
|
6
5
|
var dvssBackendModuleUtility = require('@dv4resi/dvss-backend-module-utility');
|
|
7
6
|
var axios = require('@nestjs/axios');
|
|
8
7
|
var config = require('@nestjs/config');
|
|
8
|
+
var path = require('path');
|
|
9
9
|
var rxjs = require('rxjs');
|
|
10
|
+
var dotenv = require('dotenv');
|
|
10
11
|
var models = require('@dv4resi/dvss-backend-module-datastore/dist/datastore/models');
|
|
11
|
-
var dvssBackendModuleDatastore = require('@dv4resi/dvss-backend-module-datastore');
|
|
12
12
|
var common_enum = require('@dv4resi/dvss-backend-module-datastore/dist/datastore/commons/common.enum');
|
|
13
13
|
var capabilityIntegration_model = require('@dv4resi/dvss-backend-module-datastore/dist/datastore/models/capability-integration.model');
|
|
14
14
|
var capability_model = require('@dv4resi/dvss-backend-module-datastore/dist/datastore/models/capability.model');
|
|
15
|
+
var luxonDate_util = require('@dv4resi/dvss-backend-module-utility/dist/common/utils/luxon-date.util');
|
|
15
16
|
|
|
16
17
|
var __defProp = Object.defineProperty;
|
|
17
18
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
@@ -79,10 +80,6 @@ AppController = _ts_decorate2([
|
|
|
79
80
|
typeof AppService === "undefined" ? Object : AppService
|
|
80
81
|
])
|
|
81
82
|
], AppController);
|
|
82
|
-
var rootEnvPath = path.resolve(__dirname, "../../../.env");
|
|
83
|
-
dotenv.config({
|
|
84
|
-
path: rootEnvPath
|
|
85
|
-
});
|
|
86
83
|
function _ts_decorate3(decorators, target, key, desc2) {
|
|
87
84
|
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
88
85
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
@@ -90,31 +87,19 @@ function _ts_decorate3(decorators, target, key, desc2) {
|
|
|
90
87
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
91
88
|
}
|
|
92
89
|
__name(_ts_decorate3, "_ts_decorate");
|
|
93
|
-
function _ts_metadata3(k, v) {
|
|
94
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
95
|
-
}
|
|
96
|
-
__name(_ts_metadata3, "_ts_metadata");
|
|
97
90
|
var AppService2 = class {
|
|
98
91
|
static {
|
|
99
92
|
__name(this, "AppService");
|
|
100
93
|
}
|
|
101
|
-
/**
|
|
102
|
-
* Creates an instance of the app service
|
|
103
|
-
*/
|
|
104
|
-
constructor() {
|
|
105
|
-
}
|
|
106
94
|
getHello() {
|
|
107
|
-
console.log(`${this.constructor.name}::getHello`);
|
|
108
95
|
return "Hello World!";
|
|
109
96
|
}
|
|
110
97
|
};
|
|
111
98
|
AppService2 = _ts_decorate3([
|
|
112
|
-
common.Injectable()
|
|
113
|
-
_ts_metadata3("design:type", Function),
|
|
114
|
-
_ts_metadata3("design:paramtypes", [])
|
|
99
|
+
common.Injectable()
|
|
115
100
|
], AppService2);
|
|
116
101
|
|
|
117
|
-
// ../../packages/dvss-integration-
|
|
102
|
+
// ../../packages/dvss-integration-libs/src/app.controller.ts
|
|
118
103
|
function _ts_decorate4(decorators, target, key, desc2) {
|
|
119
104
|
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
120
105
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
@@ -122,10 +107,10 @@ function _ts_decorate4(decorators, target, key, desc2) {
|
|
|
122
107
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
123
108
|
}
|
|
124
109
|
__name(_ts_decorate4, "_ts_decorate");
|
|
125
|
-
function
|
|
110
|
+
function _ts_metadata3(k, v) {
|
|
126
111
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
127
112
|
}
|
|
128
|
-
__name(
|
|
113
|
+
__name(_ts_metadata3, "_ts_metadata");
|
|
129
114
|
var AppController2 = class {
|
|
130
115
|
static {
|
|
131
116
|
__name(this, "AppController");
|
|
@@ -139,74 +124,18 @@ var AppController2 = class {
|
|
|
139
124
|
}
|
|
140
125
|
};
|
|
141
126
|
_ts_decorate4([
|
|
142
|
-
common.Get("integration-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
127
|
+
common.Get("integration-libs"),
|
|
128
|
+
_ts_metadata3("design:type", Function),
|
|
129
|
+
_ts_metadata3("design:paramtypes", []),
|
|
130
|
+
_ts_metadata3("design:returntype", String)
|
|
146
131
|
], AppController2.prototype, "getHello", null);
|
|
147
132
|
AppController2 = _ts_decorate4([
|
|
148
133
|
common.Controller(),
|
|
149
|
-
|
|
150
|
-
|
|
134
|
+
_ts_metadata3("design:type", Function),
|
|
135
|
+
_ts_metadata3("design:paramtypes", [
|
|
151
136
|
typeof AppService2 === "undefined" ? Object : AppService2
|
|
152
137
|
])
|
|
153
138
|
], AppController2);
|
|
154
|
-
function _ts_decorate5(decorators, target, key, desc2) {
|
|
155
|
-
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
156
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
157
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
158
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
159
|
-
}
|
|
160
|
-
__name(_ts_decorate5, "_ts_decorate");
|
|
161
|
-
var AppService3 = class {
|
|
162
|
-
static {
|
|
163
|
-
__name(this, "AppService");
|
|
164
|
-
}
|
|
165
|
-
getHello() {
|
|
166
|
-
return "Hello World!";
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
AppService3 = _ts_decorate5([
|
|
170
|
-
common.Injectable()
|
|
171
|
-
], AppService3);
|
|
172
|
-
|
|
173
|
-
// ../../packages/dvss-integration-libs/src/app.controller.ts
|
|
174
|
-
function _ts_decorate6(decorators, target, key, desc2) {
|
|
175
|
-
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
176
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
177
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
178
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
179
|
-
}
|
|
180
|
-
__name(_ts_decorate6, "_ts_decorate");
|
|
181
|
-
function _ts_metadata5(k, v) {
|
|
182
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
183
|
-
}
|
|
184
|
-
__name(_ts_metadata5, "_ts_metadata");
|
|
185
|
-
var AppController3 = class {
|
|
186
|
-
static {
|
|
187
|
-
__name(this, "AppController");
|
|
188
|
-
}
|
|
189
|
-
appService;
|
|
190
|
-
constructor(appService) {
|
|
191
|
-
this.appService = appService;
|
|
192
|
-
}
|
|
193
|
-
getHello() {
|
|
194
|
-
return this.appService.getHello();
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
_ts_decorate6([
|
|
198
|
-
common.Get("integration-libs"),
|
|
199
|
-
_ts_metadata5("design:type", Function),
|
|
200
|
-
_ts_metadata5("design:paramtypes", []),
|
|
201
|
-
_ts_metadata5("design:returntype", String)
|
|
202
|
-
], AppController3.prototype, "getHello", null);
|
|
203
|
-
AppController3 = _ts_decorate6([
|
|
204
|
-
common.Controller(),
|
|
205
|
-
_ts_metadata5("design:type", Function),
|
|
206
|
-
_ts_metadata5("design:paramtypes", [
|
|
207
|
-
typeof AppService3 === "undefined" ? Object : AppService3
|
|
208
|
-
])
|
|
209
|
-
], AppController3);
|
|
210
139
|
|
|
211
140
|
// ../../packages/dvss-integration-libs/src/integration-traffic-router/constants/http.constant.ts
|
|
212
141
|
var HTTP_METHOD = /* @__PURE__ */ (function(HTTP_METHOD2) {
|
|
@@ -217,17 +146,17 @@ var HTTP_METHOD = /* @__PURE__ */ (function(HTTP_METHOD2) {
|
|
|
217
146
|
HTTP_METHOD2["PATCH"] = "PATCH";
|
|
218
147
|
return HTTP_METHOD2;
|
|
219
148
|
})({});
|
|
220
|
-
function
|
|
149
|
+
function _ts_decorate5(decorators, target, key, desc2) {
|
|
221
150
|
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
222
151
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
223
152
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
224
153
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
225
154
|
}
|
|
226
|
-
__name(
|
|
227
|
-
function
|
|
155
|
+
__name(_ts_decorate5, "_ts_decorate");
|
|
156
|
+
function _ts_metadata4(k, v) {
|
|
228
157
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
229
158
|
}
|
|
230
|
-
__name(
|
|
159
|
+
__name(_ts_metadata4, "_ts_metadata");
|
|
231
160
|
exports.IntegrationRequestLoggerService = class _IntegrationRequestLoggerService {
|
|
232
161
|
static {
|
|
233
162
|
__name(this, "IntegrationRequestLoggerService");
|
|
@@ -304,20 +233,20 @@ exports.IntegrationRequestLoggerService = class _IntegrationRequestLoggerService
|
|
|
304
233
|
}
|
|
305
234
|
}
|
|
306
235
|
};
|
|
307
|
-
exports.IntegrationRequestLoggerService =
|
|
236
|
+
exports.IntegrationRequestLoggerService = _ts_decorate5([
|
|
308
237
|
common.Injectable(),
|
|
309
|
-
|
|
310
|
-
|
|
238
|
+
_ts_metadata4("design:type", Function),
|
|
239
|
+
_ts_metadata4("design:paramtypes", [
|
|
311
240
|
typeof dvssBackendModuleUtility.LoggerService === "undefined" ? Object : dvssBackendModuleUtility.LoggerService
|
|
312
241
|
])
|
|
313
242
|
], exports.IntegrationRequestLoggerService);
|
|
314
|
-
function
|
|
243
|
+
function _ts_decorate6(decorators, target, key, desc2) {
|
|
315
244
|
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
316
245
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
317
246
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
318
247
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
319
248
|
}
|
|
320
|
-
__name(
|
|
249
|
+
__name(_ts_decorate6, "_ts_decorate");
|
|
321
250
|
exports.RateLimiterService = class RateLimiterService {
|
|
322
251
|
static {
|
|
323
252
|
__name(this, "RateLimiterService");
|
|
@@ -330,22 +259,22 @@ exports.RateLimiterService = class RateLimiterService {
|
|
|
330
259
|
async validateAndEnforceRateLimit() {
|
|
331
260
|
}
|
|
332
261
|
};
|
|
333
|
-
exports.RateLimiterService =
|
|
262
|
+
exports.RateLimiterService = _ts_decorate6([
|
|
334
263
|
common.Injectable()
|
|
335
264
|
], exports.RateLimiterService);
|
|
336
265
|
|
|
337
266
|
// ../../packages/dvss-integration-libs/src/integration-traffic-router/gateway/traffic-gateway.service.ts
|
|
338
|
-
function
|
|
267
|
+
function _ts_decorate7(decorators, target, key, desc2) {
|
|
339
268
|
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
340
269
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
341
270
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
342
271
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
343
272
|
}
|
|
344
|
-
__name(
|
|
345
|
-
function
|
|
273
|
+
__name(_ts_decorate7, "_ts_decorate");
|
|
274
|
+
function _ts_metadata5(k, v) {
|
|
346
275
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
347
276
|
}
|
|
348
|
-
__name(
|
|
277
|
+
__name(_ts_metadata5, "_ts_metadata");
|
|
349
278
|
exports.TrafficGatewayService = class TrafficGatewayService {
|
|
350
279
|
static {
|
|
351
280
|
__name(this, "TrafficGatewayService");
|
|
@@ -540,34 +469,34 @@ exports.TrafficGatewayService = class TrafficGatewayService {
|
|
|
540
469
|
};
|
|
541
470
|
}
|
|
542
471
|
};
|
|
543
|
-
exports.TrafficGatewayService =
|
|
472
|
+
exports.TrafficGatewayService = _ts_decorate7([
|
|
544
473
|
common.Injectable(),
|
|
545
|
-
|
|
546
|
-
|
|
474
|
+
_ts_metadata5("design:type", Function),
|
|
475
|
+
_ts_metadata5("design:paramtypes", [
|
|
547
476
|
typeof axios.HttpService === "undefined" ? Object : axios.HttpService,
|
|
548
477
|
typeof exports.IntegrationRequestLoggerService === "undefined" ? Object : exports.IntegrationRequestLoggerService,
|
|
549
478
|
typeof exports.RateLimiterService === "undefined" ? Object : exports.RateLimiterService
|
|
550
479
|
])
|
|
551
480
|
], exports.TrafficGatewayService);
|
|
552
|
-
var
|
|
481
|
+
var rootEnvPath = path.resolve(__dirname, "../../../.env");
|
|
553
482
|
dotenv.config({
|
|
554
|
-
path:
|
|
483
|
+
path: rootEnvPath
|
|
555
484
|
});
|
|
556
485
|
|
|
557
486
|
// ../../packages/dvss-integration-libs/src/app.module.ts
|
|
558
|
-
function
|
|
487
|
+
function _ts_decorate8(decorators, target, key, desc2) {
|
|
559
488
|
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
560
489
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
561
490
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
562
491
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
563
492
|
}
|
|
564
|
-
__name(
|
|
493
|
+
__name(_ts_decorate8, "_ts_decorate");
|
|
565
494
|
exports.IntegrationLibsModule = class AppModule {
|
|
566
495
|
static {
|
|
567
496
|
__name(this, "AppModule");
|
|
568
497
|
}
|
|
569
498
|
};
|
|
570
|
-
exports.IntegrationLibsModule =
|
|
499
|
+
exports.IntegrationLibsModule = _ts_decorate8([
|
|
571
500
|
common.Module({
|
|
572
501
|
imports: [
|
|
573
502
|
// Load environment variables from root .env file
|
|
@@ -579,10 +508,10 @@ exports.IntegrationLibsModule = _ts_decorate10([
|
|
|
579
508
|
dvssBackendModuleUtility.LoggerModule
|
|
580
509
|
],
|
|
581
510
|
controllers: [
|
|
582
|
-
|
|
511
|
+
AppController2
|
|
583
512
|
],
|
|
584
513
|
providers: [
|
|
585
|
-
|
|
514
|
+
AppService2,
|
|
586
515
|
exports.TrafficGatewayService,
|
|
587
516
|
exports.IntegrationRequestLoggerService,
|
|
588
517
|
exports.RateLimiterService
|
|
@@ -754,17 +683,17 @@ var BaseMembershipManagement = class {
|
|
|
754
683
|
__name(this, "BaseMembershipManagement");
|
|
755
684
|
}
|
|
756
685
|
};
|
|
757
|
-
function
|
|
686
|
+
function _ts_decorate9(decorators, target, key, desc2) {
|
|
758
687
|
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
759
688
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
760
689
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
761
690
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
762
691
|
}
|
|
763
|
-
__name(
|
|
764
|
-
function
|
|
692
|
+
__name(_ts_decorate9, "_ts_decorate");
|
|
693
|
+
function _ts_metadata6(k, v) {
|
|
765
694
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
766
695
|
}
|
|
767
|
-
__name(
|
|
696
|
+
__name(_ts_metadata6, "_ts_metadata");
|
|
768
697
|
exports.BaseIntegrationConfiguration = class BaseIntegrationConfiguration {
|
|
769
698
|
static {
|
|
770
699
|
__name(this, "BaseIntegrationConfiguration");
|
|
@@ -955,10 +884,10 @@ exports.BaseIntegrationConfiguration = class BaseIntegrationConfiguration {
|
|
|
955
884
|
return integration;
|
|
956
885
|
}
|
|
957
886
|
};
|
|
958
|
-
exports.BaseIntegrationConfiguration =
|
|
887
|
+
exports.BaseIntegrationConfiguration = _ts_decorate9([
|
|
959
888
|
common.Injectable(),
|
|
960
|
-
|
|
961
|
-
|
|
889
|
+
_ts_metadata6("design:type", Function),
|
|
890
|
+
_ts_metadata6("design:paramtypes", [
|
|
962
891
|
typeof IntegrationConfigurationDao === "undefined" ? Object : IntegrationConfigurationDao,
|
|
963
892
|
typeof CommonValidationDatabaseService === "undefined" ? Object : CommonValidationDatabaseService,
|
|
964
893
|
typeof dvssBackendModuleUtility.LoggerService === "undefined" ? Object : dvssBackendModuleUtility.LoggerService
|
|
@@ -1278,9 +1207,9 @@ var Table = class Table2 {
|
|
|
1278
1207
|
[IsDrizzleTable] = true;
|
|
1279
1208
|
/** @internal */
|
|
1280
1209
|
[ExtraConfigBuilder] = void 0;
|
|
1281
|
-
constructor(name,
|
|
1210
|
+
constructor(name, schema4, baseName) {
|
|
1282
1211
|
this[TableName] = this[OriginalName] = name;
|
|
1283
|
-
this[Schema] =
|
|
1212
|
+
this[Schema] = schema4;
|
|
1284
1213
|
this[BaseName] = baseName;
|
|
1285
1214
|
}
|
|
1286
1215
|
};
|
|
@@ -2256,11 +2185,11 @@ var View = class View2 {
|
|
|
2256
2185
|
static [entityKind] = "View";
|
|
2257
2186
|
/** @internal */
|
|
2258
2187
|
[ViewBaseConfig];
|
|
2259
|
-
constructor({ name: name2, schema:
|
|
2188
|
+
constructor({ name: name2, schema: schema4, selectedFields, query }) {
|
|
2260
2189
|
this[ViewBaseConfig] = {
|
|
2261
2190
|
name: name2,
|
|
2262
2191
|
originalName: name2,
|
|
2263
|
-
schema:
|
|
2192
|
+
schema: schema4,
|
|
2264
2193
|
selectedFields,
|
|
2265
2194
|
query,
|
|
2266
2195
|
isExisting: !query,
|
|
@@ -2355,24 +2284,108 @@ function getTableColumns(table) {
|
|
|
2355
2284
|
}
|
|
2356
2285
|
__name(getTableColumns, "getTableColumns");
|
|
2357
2286
|
|
|
2358
|
-
// ../../packages/dvss-integration-libs/src/integration-common-utils/dao/integration-
|
|
2359
|
-
function
|
|
2287
|
+
// ../../packages/dvss-integration-libs/src/integration-common-utils/dao/integration-common.dao.ts
|
|
2288
|
+
function _ts_decorate10(decorators, target, key, desc2) {
|
|
2360
2289
|
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
2361
2290
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
2362
2291
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2363
2292
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2364
2293
|
}
|
|
2365
|
-
__name(
|
|
2366
|
-
function
|
|
2294
|
+
__name(_ts_decorate10, "_ts_decorate");
|
|
2295
|
+
function _ts_metadata7(k, v) {
|
|
2367
2296
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2368
2297
|
}
|
|
2369
|
-
__name(
|
|
2298
|
+
__name(_ts_metadata7, "_ts_metadata");
|
|
2370
2299
|
function _ts_param(paramIndex, decorator) {
|
|
2371
2300
|
return function(target, key) {
|
|
2372
2301
|
decorator(target, key, paramIndex);
|
|
2373
2302
|
};
|
|
2374
2303
|
}
|
|
2375
2304
|
__name(_ts_param, "_ts_param");
|
|
2305
|
+
exports.IntegrationCommonDao = class IntegrationCommonDao {
|
|
2306
|
+
static {
|
|
2307
|
+
__name(this, "IntegrationCommonDao");
|
|
2308
|
+
}
|
|
2309
|
+
conn;
|
|
2310
|
+
logger;
|
|
2311
|
+
fileName = "integration-common.dao";
|
|
2312
|
+
constructor(conn, logger) {
|
|
2313
|
+
this.conn = conn;
|
|
2314
|
+
this.logger = logger;
|
|
2315
|
+
}
|
|
2316
|
+
/**
|
|
2317
|
+
* Gets timezone using userContext (first propertyId) with fallback to projectId
|
|
2318
|
+
* First tries to get timezone from user's first propertyId, then falls back to projectId
|
|
2319
|
+
* @param input - Object containing projectId and loggedInUserId
|
|
2320
|
+
* @returns Promise resolving to timezone string
|
|
2321
|
+
*/
|
|
2322
|
+
async getTimezoneForRequest(input) {
|
|
2323
|
+
const { projectId, loggedInUserId } = input;
|
|
2324
|
+
try {
|
|
2325
|
+
const userBehavior = await this.conn.query.userIdentityBehaviorMapping.findFirst({
|
|
2326
|
+
where: and(eq(dvssBackendModuleDatastore.schema.userIdentityBehaviorMapping.userIdentityId, loggedInUserId), isNotNull(dvssBackendModuleDatastore.schema.userIdentityBehaviorMapping.propertyId), isNull(dvssBackendModuleDatastore.schema.userIdentityBehaviorMapping.deletedAt)),
|
|
2327
|
+
with: {
|
|
2328
|
+
property: true
|
|
2329
|
+
}
|
|
2330
|
+
});
|
|
2331
|
+
if (userBehavior?.propertyId && userBehavior.property?.timezone) {
|
|
2332
|
+
this.logger.info(loggedInUserId, this.getTimezoneForRequest.name, this.fileName, "Successfully fetched property timezone using userContext", {
|
|
2333
|
+
projectId,
|
|
2334
|
+
loggedInUserId,
|
|
2335
|
+
propertyId: userBehavior.propertyId,
|
|
2336
|
+
timezone: userBehavior.property.timezone
|
|
2337
|
+
});
|
|
2338
|
+
return userBehavior.property.timezone;
|
|
2339
|
+
}
|
|
2340
|
+
if (projectId) {
|
|
2341
|
+
const properties = await this.conn.query.property.findMany({
|
|
2342
|
+
where: and(eq(dvssBackendModuleDatastore.schema.property.projectId, projectId), isNull(dvssBackendModuleDatastore.schema.property.deletedAt)),
|
|
2343
|
+
limit: 1
|
|
2344
|
+
});
|
|
2345
|
+
if (properties.length > 0 && properties[0].timezone) {
|
|
2346
|
+
this.logger.info(loggedInUserId, this.getTimezoneForRequest.name, this.fileName, "Successfully fetched property timezone using projectId", {
|
|
2347
|
+
projectId,
|
|
2348
|
+
propertyId: properties[0].id,
|
|
2349
|
+
timezone: properties[0].timezone
|
|
2350
|
+
});
|
|
2351
|
+
return properties[0].timezone;
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
2354
|
+
} catch (error) {
|
|
2355
|
+
this.logger.warn(loggedInUserId, this.getTimezoneForRequest.name, this.fileName, "Error fetching property timezone, using default", {
|
|
2356
|
+
projectId,
|
|
2357
|
+
error
|
|
2358
|
+
});
|
|
2359
|
+
}
|
|
2360
|
+
return dvssBackendModuleUtility.DEFAULT_TIMEZONE;
|
|
2361
|
+
}
|
|
2362
|
+
};
|
|
2363
|
+
exports.IntegrationCommonDao = _ts_decorate10([
|
|
2364
|
+
common.Injectable(),
|
|
2365
|
+
_ts_param(0, common.Inject(dvssBackendModuleDatastore.appConstants.DB_CONNECTION)),
|
|
2366
|
+
_ts_metadata7("design:type", Function),
|
|
2367
|
+
_ts_metadata7("design:paramtypes", [
|
|
2368
|
+
typeof MySql2Database === "undefined" ? Object : MySql2Database,
|
|
2369
|
+
typeof dvssBackendModuleUtility.LoggerService === "undefined" ? Object : dvssBackendModuleUtility.LoggerService
|
|
2370
|
+
])
|
|
2371
|
+
], exports.IntegrationCommonDao);
|
|
2372
|
+
function _ts_decorate11(decorators, target, key, desc2) {
|
|
2373
|
+
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
2374
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
2375
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2376
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2377
|
+
}
|
|
2378
|
+
__name(_ts_decorate11, "_ts_decorate");
|
|
2379
|
+
function _ts_metadata8(k, v) {
|
|
2380
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2381
|
+
}
|
|
2382
|
+
__name(_ts_metadata8, "_ts_metadata");
|
|
2383
|
+
function _ts_param2(paramIndex, decorator) {
|
|
2384
|
+
return function(target, key) {
|
|
2385
|
+
decorator(target, key, paramIndex);
|
|
2386
|
+
};
|
|
2387
|
+
}
|
|
2388
|
+
__name(_ts_param2, "_ts_param");
|
|
2376
2389
|
exports.IntegrationConfigurationDao = class IntegrationConfigurationDao2 {
|
|
2377
2390
|
static {
|
|
2378
2391
|
__name(this, "IntegrationConfigurationDao");
|
|
@@ -2682,60 +2695,26 @@ exports.IntegrationConfigurationDao = class IntegrationConfigurationDao2 {
|
|
|
2682
2695
|
}
|
|
2683
2696
|
}
|
|
2684
2697
|
};
|
|
2685
|
-
exports.IntegrationConfigurationDao =
|
|
2698
|
+
exports.IntegrationConfigurationDao = _ts_decorate11([
|
|
2686
2699
|
common.Injectable(),
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2700
|
+
_ts_param2(0, common.Inject(dvssBackendModuleDatastore.appConstants.DB_CONNECTION)),
|
|
2701
|
+
_ts_metadata8("design:type", Function),
|
|
2702
|
+
_ts_metadata8("design:paramtypes", [
|
|
2690
2703
|
typeof MySql2Database === "undefined" ? Object : MySql2Database,
|
|
2691
2704
|
typeof dvssBackendModuleUtility.LoggerService === "undefined" ? Object : dvssBackendModuleUtility.LoggerService
|
|
2692
2705
|
])
|
|
2693
2706
|
], exports.IntegrationConfigurationDao);
|
|
2694
|
-
function
|
|
2695
|
-
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
2696
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
2697
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2698
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2699
|
-
}
|
|
2700
|
-
__name(_ts_decorate13, "_ts_decorate");
|
|
2701
|
-
function _ts_metadata10(k, v) {
|
|
2702
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2703
|
-
}
|
|
2704
|
-
__name(_ts_metadata10, "_ts_metadata");
|
|
2705
|
-
function _ts_param2(paramIndex, decorator) {
|
|
2706
|
-
return function(target, key) {
|
|
2707
|
-
decorator(target, key, paramIndex);
|
|
2708
|
-
};
|
|
2709
|
-
}
|
|
2710
|
-
__name(_ts_param2, "_ts_param");
|
|
2711
|
-
exports.IntegrationUserManagementDao = class IntegrationUserManagementDao {
|
|
2712
|
-
static {
|
|
2713
|
-
__name(this, "IntegrationUserManagementDao");
|
|
2714
|
-
}
|
|
2715
|
-
conn;
|
|
2716
|
-
constructor(conn) {
|
|
2717
|
-
this.conn = conn;
|
|
2718
|
-
}
|
|
2719
|
-
};
|
|
2720
|
-
exports.IntegrationUserManagementDao = _ts_decorate13([
|
|
2721
|
-
common.Injectable(),
|
|
2722
|
-
_ts_param2(0, common.Inject(dvssBackendModuleDatastore.appConstants.DB_CONNECTION)),
|
|
2723
|
-
_ts_metadata10("design:type", Function),
|
|
2724
|
-
_ts_metadata10("design:paramtypes", [
|
|
2725
|
-
typeof MySql2Database === "undefined" ? Object : MySql2Database
|
|
2726
|
-
])
|
|
2727
|
-
], exports.IntegrationUserManagementDao);
|
|
2728
|
-
function _ts_decorate14(decorators, target, key, desc2) {
|
|
2707
|
+
function _ts_decorate12(decorators, target, key, desc2) {
|
|
2729
2708
|
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
2730
2709
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
2731
2710
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2732
2711
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2733
2712
|
}
|
|
2734
|
-
__name(
|
|
2735
|
-
function
|
|
2713
|
+
__name(_ts_decorate12, "_ts_decorate");
|
|
2714
|
+
function _ts_metadata9(k, v) {
|
|
2736
2715
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2737
2716
|
}
|
|
2738
|
-
__name(
|
|
2717
|
+
__name(_ts_metadata9, "_ts_metadata");
|
|
2739
2718
|
function _ts_param3(paramIndex, decorator) {
|
|
2740
2719
|
return function(target, key) {
|
|
2741
2720
|
decorator(target, key, paramIndex);
|
|
@@ -2903,30 +2882,132 @@ exports.IntegrationResourceManagementDao = class IntegrationResourceManagementDa
|
|
|
2903
2882
|
}
|
|
2904
2883
|
}
|
|
2905
2884
|
};
|
|
2906
|
-
exports.IntegrationResourceManagementDao =
|
|
2885
|
+
exports.IntegrationResourceManagementDao = _ts_decorate12([
|
|
2907
2886
|
common.Injectable(),
|
|
2908
2887
|
_ts_param3(0, common.Inject(dvssBackendModuleDatastore.appConstants.DB_CONNECTION)),
|
|
2909
|
-
|
|
2910
|
-
|
|
2888
|
+
_ts_metadata9("design:type", Function),
|
|
2889
|
+
_ts_metadata9("design:paramtypes", [
|
|
2911
2890
|
typeof MySql2Database === "undefined" ? Object : MySql2Database,
|
|
2912
2891
|
typeof dvssBackendModuleUtility.LoggerService === "undefined" ? Object : dvssBackendModuleUtility.LoggerService
|
|
2913
2892
|
])
|
|
2914
2893
|
], exports.IntegrationResourceManagementDao);
|
|
2915
|
-
function
|
|
2894
|
+
function _ts_decorate13(decorators, target, key, desc2) {
|
|
2916
2895
|
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
2917
2896
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
2918
2897
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2919
2898
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2920
2899
|
}
|
|
2921
|
-
__name(
|
|
2922
|
-
function
|
|
2900
|
+
__name(_ts_decorate13, "_ts_decorate");
|
|
2901
|
+
function _ts_metadata10(k, v) {
|
|
2923
2902
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2924
2903
|
}
|
|
2925
|
-
__name(
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
}
|
|
2904
|
+
__name(_ts_metadata10, "_ts_metadata");
|
|
2905
|
+
function _ts_param4(paramIndex, decorator) {
|
|
2906
|
+
return function(target, key) {
|
|
2907
|
+
decorator(target, key, paramIndex);
|
|
2908
|
+
};
|
|
2909
|
+
}
|
|
2910
|
+
__name(_ts_param4, "_ts_param");
|
|
2911
|
+
exports.IntegrationUserManagementDao = class IntegrationUserManagementDao {
|
|
2912
|
+
static {
|
|
2913
|
+
__name(this, "IntegrationUserManagementDao");
|
|
2914
|
+
}
|
|
2915
|
+
conn;
|
|
2916
|
+
constructor(conn) {
|
|
2917
|
+
this.conn = conn;
|
|
2918
|
+
}
|
|
2919
|
+
};
|
|
2920
|
+
exports.IntegrationUserManagementDao = _ts_decorate13([
|
|
2921
|
+
common.Injectable(),
|
|
2922
|
+
_ts_param4(0, common.Inject(dvssBackendModuleDatastore.appConstants.DB_CONNECTION)),
|
|
2923
|
+
_ts_metadata10("design:type", Function),
|
|
2924
|
+
_ts_metadata10("design:paramtypes", [
|
|
2925
|
+
typeof MySql2Database === "undefined" ? Object : MySql2Database
|
|
2926
|
+
])
|
|
2927
|
+
], exports.IntegrationUserManagementDao);
|
|
2928
|
+
function _ts_decorate14(decorators, target, key, desc2) {
|
|
2929
|
+
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
2930
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
2931
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2932
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2933
|
+
}
|
|
2934
|
+
__name(_ts_decorate14, "_ts_decorate");
|
|
2935
|
+
function _ts_metadata11(k, v) {
|
|
2936
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2937
|
+
}
|
|
2938
|
+
__name(_ts_metadata11, "_ts_metadata");
|
|
2939
|
+
var AppService3 = class {
|
|
2940
|
+
static {
|
|
2941
|
+
__name(this, "AppService");
|
|
2942
|
+
}
|
|
2943
|
+
/**
|
|
2944
|
+
* Creates an instance of the app service
|
|
2945
|
+
*/
|
|
2946
|
+
constructor() {
|
|
2947
|
+
}
|
|
2948
|
+
getHello() {
|
|
2949
|
+
console.log(`${this.constructor.name}::getHello`);
|
|
2950
|
+
return "Hello World!";
|
|
2951
|
+
}
|
|
2952
|
+
};
|
|
2953
|
+
AppService3 = _ts_decorate14([
|
|
2954
|
+
common.Injectable(),
|
|
2955
|
+
_ts_metadata11("design:type", Function),
|
|
2956
|
+
_ts_metadata11("design:paramtypes", [])
|
|
2957
|
+
], AppService3);
|
|
2958
|
+
|
|
2959
|
+
// ../../packages/dvss-integration-trybe/src/app.controller.ts
|
|
2960
|
+
function _ts_decorate15(decorators, target, key, desc2) {
|
|
2961
|
+
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
2962
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
2963
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2964
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2965
|
+
}
|
|
2966
|
+
__name(_ts_decorate15, "_ts_decorate");
|
|
2967
|
+
function _ts_metadata12(k, v) {
|
|
2968
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2969
|
+
}
|
|
2970
|
+
__name(_ts_metadata12, "_ts_metadata");
|
|
2971
|
+
var AppController3 = class {
|
|
2972
|
+
static {
|
|
2973
|
+
__name(this, "AppController");
|
|
2974
|
+
}
|
|
2975
|
+
appService;
|
|
2976
|
+
constructor(appService) {
|
|
2977
|
+
this.appService = appService;
|
|
2978
|
+
}
|
|
2979
|
+
getHello() {
|
|
2980
|
+
return this.appService.getHello();
|
|
2981
|
+
}
|
|
2982
|
+
};
|
|
2983
|
+
_ts_decorate15([
|
|
2984
|
+
common.Get("integration-trybe"),
|
|
2985
|
+
_ts_metadata12("design:type", Function),
|
|
2986
|
+
_ts_metadata12("design:paramtypes", []),
|
|
2987
|
+
_ts_metadata12("design:returntype", String)
|
|
2988
|
+
], AppController3.prototype, "getHello", null);
|
|
2989
|
+
AppController3 = _ts_decorate15([
|
|
2990
|
+
common.Controller(),
|
|
2991
|
+
_ts_metadata12("design:type", Function),
|
|
2992
|
+
_ts_metadata12("design:paramtypes", [
|
|
2993
|
+
typeof AppService3 === "undefined" ? Object : AppService3
|
|
2994
|
+
])
|
|
2995
|
+
], AppController3);
|
|
2996
|
+
function _ts_decorate16(decorators, target, key, desc2) {
|
|
2997
|
+
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
2998
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
2999
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3000
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3001
|
+
}
|
|
3002
|
+
__name(_ts_decorate16, "_ts_decorate");
|
|
3003
|
+
function _ts_metadata13(k, v) {
|
|
3004
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3005
|
+
}
|
|
3006
|
+
__name(_ts_metadata13, "_ts_metadata");
|
|
3007
|
+
exports.TrybeCustomerManagement = class _TrybeCustomerManagement {
|
|
3008
|
+
static {
|
|
3009
|
+
__name(this, "TrybeCustomerManagement");
|
|
3010
|
+
}
|
|
2930
3011
|
logger;
|
|
2931
3012
|
trafficGatewayService;
|
|
2932
3013
|
fileName = "customer-management.service";
|
|
@@ -3035,10 +3116,10 @@ exports.TrybeCustomerManagement = class _TrybeCustomerManagement {
|
|
|
3035
3116
|
}
|
|
3036
3117
|
}
|
|
3037
3118
|
};
|
|
3038
|
-
exports.TrybeCustomerManagement =
|
|
3119
|
+
exports.TrybeCustomerManagement = _ts_decorate16([
|
|
3039
3120
|
common.Injectable(),
|
|
3040
|
-
|
|
3041
|
-
|
|
3121
|
+
_ts_metadata13("design:type", Function),
|
|
3122
|
+
_ts_metadata13("design:paramtypes", [
|
|
3042
3123
|
typeof dvssBackendModuleUtility.LoggerService === "undefined" ? Object : dvssBackendModuleUtility.LoggerService,
|
|
3043
3124
|
typeof exports.TrafficGatewayService === "undefined" ? Object : exports.TrafficGatewayService
|
|
3044
3125
|
])
|
|
@@ -3056,17 +3137,17 @@ function isValidHttpUrl(urlString) {
|
|
|
3056
3137
|
__name(isValidHttpUrl, "isValidHttpUrl");
|
|
3057
3138
|
|
|
3058
3139
|
// ../../packages/dvss-integration-trybe/src/capabilities/auth/auth.service.ts
|
|
3059
|
-
function
|
|
3140
|
+
function _ts_decorate17(decorators, target, key, desc2) {
|
|
3060
3141
|
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
3061
3142
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
3062
3143
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3063
3144
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3064
3145
|
}
|
|
3065
|
-
__name(
|
|
3066
|
-
function
|
|
3146
|
+
__name(_ts_decorate17, "_ts_decorate");
|
|
3147
|
+
function _ts_metadata14(k, v) {
|
|
3067
3148
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3068
3149
|
}
|
|
3069
|
-
__name(
|
|
3150
|
+
__name(_ts_metadata14, "_ts_metadata");
|
|
3070
3151
|
exports.TrybeAuthService = class _TrybeAuthService {
|
|
3071
3152
|
static {
|
|
3072
3153
|
__name(this, "TrybeAuthService");
|
|
@@ -3164,10 +3245,10 @@ exports.TrybeAuthService = class _TrybeAuthService {
|
|
|
3164
3245
|
throw new Error("Method not implemented.");
|
|
3165
3246
|
}
|
|
3166
3247
|
};
|
|
3167
|
-
exports.TrybeAuthService =
|
|
3248
|
+
exports.TrybeAuthService = _ts_decorate17([
|
|
3168
3249
|
common.Injectable(),
|
|
3169
|
-
|
|
3170
|
-
|
|
3250
|
+
_ts_metadata14("design:type", Function),
|
|
3251
|
+
_ts_metadata14("design:paramtypes", [
|
|
3171
3252
|
typeof exports.TrybeCustomerManagement === "undefined" ? Object : exports.TrybeCustomerManagement,
|
|
3172
3253
|
typeof dvssBackendModuleUtility.LoggerService === "undefined" ? Object : dvssBackendModuleUtility.LoggerService
|
|
3173
3254
|
])
|
|
@@ -3230,17 +3311,17 @@ function mapTrybeCreditsToSystem(res, integration) {
|
|
|
3230
3311
|
__name(mapTrybeCreditsToSystem, "mapTrybeCreditsToSystem");
|
|
3231
3312
|
|
|
3232
3313
|
// ../../packages/dvss-integration-trybe/src/capabilities/credit-management/credit-booking.service.ts
|
|
3233
|
-
function
|
|
3314
|
+
function _ts_decorate18(decorators, target, key, desc2) {
|
|
3234
3315
|
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
3235
3316
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
3236
3317
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3237
3318
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3238
3319
|
}
|
|
3239
|
-
__name(
|
|
3240
|
-
function
|
|
3320
|
+
__name(_ts_decorate18, "_ts_decorate");
|
|
3321
|
+
function _ts_metadata15(k, v) {
|
|
3241
3322
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3242
3323
|
}
|
|
3243
|
-
__name(
|
|
3324
|
+
__name(_ts_metadata15, "_ts_metadata");
|
|
3244
3325
|
exports.TrybeCreditBooking = class _TrybeCreditBooking {
|
|
3245
3326
|
static {
|
|
3246
3327
|
__name(this, "TrybeCreditBooking");
|
|
@@ -3298,25 +3379,246 @@ exports.TrybeCreditBooking = class _TrybeCreditBooking {
|
|
|
3298
3379
|
return mapTrybeCreditsToSystem(raw, validatedIntegration);
|
|
3299
3380
|
}
|
|
3300
3381
|
};
|
|
3301
|
-
exports.TrybeCreditBooking =
|
|
3382
|
+
exports.TrybeCreditBooking = _ts_decorate18([
|
|
3302
3383
|
common.Injectable(),
|
|
3303
|
-
|
|
3304
|
-
|
|
3384
|
+
_ts_metadata15("design:type", Function),
|
|
3385
|
+
_ts_metadata15("design:paramtypes", [
|
|
3386
|
+
typeof dvssBackendModuleUtility.LoggerService === "undefined" ? Object : dvssBackendModuleUtility.LoggerService,
|
|
3387
|
+
typeof exports.TrafficGatewayService === "undefined" ? Object : exports.TrafficGatewayService,
|
|
3388
|
+
typeof exports.TrybeAuthService === "undefined" ? Object : exports.TrybeAuthService
|
|
3389
|
+
])
|
|
3390
|
+
], exports.TrybeCreditBooking);
|
|
3391
|
+
|
|
3392
|
+
// ../../packages/dvss-integration-trybe/src/capabilities/integration-configuration/integration-configuration.mapper.ts
|
|
3393
|
+
function mapTrybeSiteResponseToSystem(response) {
|
|
3394
|
+
return {
|
|
3395
|
+
customPaymentTypes: response.data?.custom_payment_types?.map((paymentType) => ({
|
|
3396
|
+
id: paymentType.id,
|
|
3397
|
+
name: paymentType.name,
|
|
3398
|
+
kind: paymentType.kind
|
|
3399
|
+
})),
|
|
3400
|
+
categoryIds: response.data?.category_ids ?? []
|
|
3401
|
+
};
|
|
3402
|
+
}
|
|
3403
|
+
__name(mapTrybeSiteResponseToSystem, "mapTrybeSiteResponseToSystem");
|
|
3404
|
+
|
|
3405
|
+
// ../../packages/dvss-integration-trybe/src/capabilities/integration-configuration/integration-configuration.service.ts
|
|
3406
|
+
function _ts_decorate19(decorators, target, key, desc2) {
|
|
3407
|
+
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
3408
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
3409
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3410
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3411
|
+
}
|
|
3412
|
+
__name(_ts_decorate19, "_ts_decorate");
|
|
3413
|
+
function _ts_metadata16(k, v) {
|
|
3414
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3415
|
+
}
|
|
3416
|
+
__name(_ts_metadata16, "_ts_metadata");
|
|
3417
|
+
exports.TrybeIntegrationConfigurationService = class TrybeIntegrationConfigurationService extends exports.BaseIntegrationConfiguration {
|
|
3418
|
+
static {
|
|
3419
|
+
__name(this, "TrybeIntegrationConfigurationService");
|
|
3420
|
+
}
|
|
3421
|
+
trybeAuthService;
|
|
3422
|
+
trafficGatewayService;
|
|
3423
|
+
constructor(integrationConfigurationDao, commonValidationDatabaseService, logger, trybeAuthService, trafficGatewayService) {
|
|
3424
|
+
super(integrationConfigurationDao, commonValidationDatabaseService, logger), this.trybeAuthService = trybeAuthService, this.trafficGatewayService = trafficGatewayService;
|
|
3425
|
+
}
|
|
3426
|
+
/**
|
|
3427
|
+
* Add capability integration: validate Trybe config, then configuredFor (offering), then delegate to base.
|
|
3428
|
+
*/
|
|
3429
|
+
async addCapabilityIntegration(input, context) {
|
|
3430
|
+
this.trybeAuthService.validateConfig({
|
|
3431
|
+
config: input.config
|
|
3432
|
+
}, context.loggedInUserId);
|
|
3433
|
+
if (input.configuredFor != null) {
|
|
3434
|
+
await this.validateCapabilityIntegrationConfiguredForInput(input.configuredFor, input.projectId);
|
|
3435
|
+
}
|
|
3436
|
+
return super.addCapabilityIntegration(input, context);
|
|
3437
|
+
}
|
|
3438
|
+
/**
|
|
3439
|
+
* Update capability integration: convert to new signature and delegate to base.
|
|
3440
|
+
*/
|
|
3441
|
+
async updateCapabilityIntegration(request, integration, loggedInUserId) {
|
|
3442
|
+
if (request.updateData.config) {
|
|
3443
|
+
this.trybeAuthService.validateConfig({
|
|
3444
|
+
config: request.updateData.config
|
|
3445
|
+
}, loggedInUserId);
|
|
3446
|
+
}
|
|
3447
|
+
return super.updateCapabilityIntegration(request, integration, loggedInUserId);
|
|
3448
|
+
}
|
|
3449
|
+
/**
|
|
3450
|
+
* Validates configuredFor (offering exists and belongs to project). Same as project-ms validateCapabilityIntegrationConfiguredForInput.
|
|
3451
|
+
*/
|
|
3452
|
+
async validateCapabilityIntegrationConfiguredForInput(configuredFor, projectId) {
|
|
3453
|
+
if (configuredFor.configuredForType !== models.CONFIGURED_FOR_TYPE_ENUM.OFFERING) {
|
|
3454
|
+
throw new Error(`configuredForType not supported: ${configuredFor.configuredForType}`);
|
|
3455
|
+
}
|
|
3456
|
+
await this.commonValidationDatabaseService.getOffering({
|
|
3457
|
+
offeringId: configuredFor.configuredForId,
|
|
3458
|
+
projectId
|
|
3459
|
+
});
|
|
3460
|
+
}
|
|
3461
|
+
/**
|
|
3462
|
+
* Trybe 3rd party: GET /shop/sites/{siteId} via executeIntegrationRequest.
|
|
3463
|
+
*/
|
|
3464
|
+
async getSiteDetailedInformation(integration, loggedInUserId) {
|
|
3465
|
+
const validatedIntegration = this.trybeAuthService.validateConfig(integration, loggedInUserId);
|
|
3466
|
+
const siteId = validatedIntegration.config.integrationConfig.siteId;
|
|
3467
|
+
const url = `/shop/sites/${siteId}`;
|
|
3468
|
+
const response = await this.trafficGatewayService.executeIntegrationRequest({
|
|
3469
|
+
apiMethod: HTTP_METHOD.GET,
|
|
3470
|
+
url,
|
|
3471
|
+
baseUrl: validatedIntegration.config.platformConfig.baseUrl,
|
|
3472
|
+
headers: validatedIntegration.headers
|
|
3473
|
+
}, validatedIntegration, loggedInUserId);
|
|
3474
|
+
return mapTrybeSiteResponseToSystem(response);
|
|
3475
|
+
}
|
|
3476
|
+
};
|
|
3477
|
+
exports.TrybeIntegrationConfigurationService = _ts_decorate19([
|
|
3478
|
+
common.Injectable(),
|
|
3479
|
+
_ts_metadata16("design:type", Function),
|
|
3480
|
+
_ts_metadata16("design:paramtypes", [
|
|
3481
|
+
typeof exports.IntegrationConfigurationDao === "undefined" ? Object : exports.IntegrationConfigurationDao,
|
|
3482
|
+
typeof dvssBackendModuleDatastore.CommonValidationDatabaseService === "undefined" ? Object : dvssBackendModuleDatastore.CommonValidationDatabaseService,
|
|
3483
|
+
typeof dvssBackendModuleUtility.LoggerService === "undefined" ? Object : dvssBackendModuleUtility.LoggerService,
|
|
3484
|
+
typeof exports.TrybeAuthService === "undefined" ? Object : exports.TrybeAuthService,
|
|
3485
|
+
typeof exports.TrafficGatewayService === "undefined" ? Object : exports.TrafficGatewayService
|
|
3486
|
+
])
|
|
3487
|
+
], exports.TrybeIntegrationConfigurationService);
|
|
3488
|
+
|
|
3489
|
+
// ../../packages/dvss-integration-trybe/src/models/integration-resource-management.model.ts
|
|
3490
|
+
var TRYBE_SUPPORTED_JOURNEYS_ENUM = /* @__PURE__ */ (function(TRYBE_SUPPORTED_JOURNEYS_ENUM2) {
|
|
3491
|
+
TRYBE_SUPPORTED_JOURNEYS_ENUM2["APPOINTMENT"] = "APPOINTMENT";
|
|
3492
|
+
TRYBE_SUPPORTED_JOURNEYS_ENUM2["SESSION"] = "SESSION";
|
|
3493
|
+
TRYBE_SUPPORTED_JOURNEYS_ENUM2["COURSE"] = "COURSE";
|
|
3494
|
+
return TRYBE_SUPPORTED_JOURNEYS_ENUM2;
|
|
3495
|
+
})({});
|
|
3496
|
+
var TRYBE_CATALOGING_BY_ENUM = /* @__PURE__ */ (function(TRYBE_CATALOGING_BY_ENUM2) {
|
|
3497
|
+
TRYBE_CATALOGING_BY_ENUM2["PEOPLE_RESOURCE"] = "PEOPLE_RESOURCE";
|
|
3498
|
+
return TRYBE_CATALOGING_BY_ENUM2;
|
|
3499
|
+
})({});
|
|
3500
|
+
|
|
3501
|
+
// ../../packages/dvss-integration-trybe/src/capabilities/integration-resource-management/integration-resource-management.service.ts
|
|
3502
|
+
function _ts_decorate20(decorators, target, key, desc2) {
|
|
3503
|
+
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
3504
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
3505
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3506
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3507
|
+
}
|
|
3508
|
+
__name(_ts_decorate20, "_ts_decorate");
|
|
3509
|
+
function _ts_metadata17(k, v) {
|
|
3510
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3511
|
+
}
|
|
3512
|
+
__name(_ts_metadata17, "_ts_metadata");
|
|
3513
|
+
var OFFERING_INTEGRATION_MAPPING_ALREADY_EXISTS = "OFFERING_INTEGRATION_MAPPING_ALREADY_EXISTS";
|
|
3514
|
+
var VALID_JOURNEY_VALUES = /* @__PURE__ */ new Set([
|
|
3515
|
+
"SESSION",
|
|
3516
|
+
"COURSE",
|
|
3517
|
+
"APPOINTMENT"
|
|
3518
|
+
]);
|
|
3519
|
+
exports.TrybeIntegrationResourceManagementService = class TrybeIntegrationResourceManagementService extends BaseIntegrationResourceManagement {
|
|
3520
|
+
static {
|
|
3521
|
+
__name(this, "TrybeIntegrationResourceManagementService");
|
|
3522
|
+
}
|
|
3523
|
+
constructor(logger, integrationResourceManagementDao) {
|
|
3524
|
+
super(integrationResourceManagementDao, logger);
|
|
3525
|
+
}
|
|
3526
|
+
/**
|
|
3527
|
+
* Validates Trybe resource mapping config (same rules as MS trybe-offering-integration-management.service).
|
|
3528
|
+
* @throws CustomException BAD_REQUEST if config is invalid
|
|
3529
|
+
*/
|
|
3530
|
+
validateResourceMappingConfig(config3) {
|
|
3531
|
+
const resourceMappingConfig = config3;
|
|
3532
|
+
if (!resourceMappingConfig.supportedJourneys || resourceMappingConfig.supportedJourneys.length === 0) {
|
|
3533
|
+
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, "Invalid Trybe resource mapping config: supportedJourneys required and must be non-empty");
|
|
3534
|
+
}
|
|
3535
|
+
if (!resourceMappingConfig.catalogingBy || // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
3536
|
+
resourceMappingConfig.catalogingBy !== TRYBE_CATALOGING_BY_ENUM.PEOPLE_RESOURCE) {
|
|
3537
|
+
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, "Invalid Trybe resource mapping config: catalogingBy must be PEOPLE_RESOURCE");
|
|
3538
|
+
}
|
|
3539
|
+
if (!resourceMappingConfig.supportedJourneys.some((journey) => VALID_JOURNEY_VALUES.has(journey))) {
|
|
3540
|
+
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, "Invalid Trybe resource mapping config: supportedJourneys must contain at least one of SESSION, COURSE, APPOINTMENT");
|
|
3541
|
+
}
|
|
3542
|
+
if (resourceMappingConfig.supportedJourneys.some((journey) => !VALID_JOURNEY_VALUES.has(journey))) {
|
|
3543
|
+
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, "Invalid Trybe resource mapping config: supportedJourneys may only contain SESSION, COURSE, APPOINTMENT");
|
|
3544
|
+
}
|
|
3545
|
+
if (!resourceMappingConfig.paymentType || typeof resourceMappingConfig.paymentType !== "string") {
|
|
3546
|
+
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, "Invalid Trybe resource mapping config: paymentType required and must be a string");
|
|
3547
|
+
}
|
|
3548
|
+
}
|
|
3549
|
+
async addResourceToIntegration(input, context) {
|
|
3550
|
+
if (input.config != null && typeof input.config === "object") {
|
|
3551
|
+
this.validateResourceMappingConfig(input.config);
|
|
3552
|
+
}
|
|
3553
|
+
const isMappingExists = await this.integrationResourceManagementDao.checkMappingExists({
|
|
3554
|
+
capabilityIntegrationId: input.capabilityIntegrationId,
|
|
3555
|
+
configuredForId: input.offeringId,
|
|
3556
|
+
configuredForType: models.CONFIGURED_FOR_TYPE_ENUM.OFFERING
|
|
3557
|
+
}, context.loggedInUserId);
|
|
3558
|
+
if (isMappingExists) {
|
|
3559
|
+
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, OFFERING_INTEGRATION_MAPPING_ALREADY_EXISTS);
|
|
3560
|
+
}
|
|
3561
|
+
return super.addResourceToIntegration(input, context);
|
|
3562
|
+
}
|
|
3563
|
+
async removeResourceFromIntegration(request, context) {
|
|
3564
|
+
const isMappingExists = await this.integrationResourceManagementDao.checkMappingExists({
|
|
3565
|
+
capabilityIntegrationId: request.capabilityIntegrationId,
|
|
3566
|
+
configuredForId: request.offeringId,
|
|
3567
|
+
configuredForType: models.CONFIGURED_FOR_TYPE_ENUM.OFFERING
|
|
3568
|
+
}, context.loggedInUserId);
|
|
3569
|
+
if (!isMappingExists) {
|
|
3570
|
+
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, "Mapping not found");
|
|
3571
|
+
}
|
|
3572
|
+
return super.removeResourceFromIntegration(request, context);
|
|
3573
|
+
}
|
|
3574
|
+
async updateOfferingIntegrationResourceConfiguration(input, context) {
|
|
3575
|
+
const resourceMapping = await this.integrationResourceManagementDao.getCapabilityIntegrationResourceMappingById(input.id, context.loggedInUserId);
|
|
3576
|
+
if (!resourceMapping) {
|
|
3577
|
+
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, "Resource mapping not found");
|
|
3578
|
+
}
|
|
3579
|
+
this.validateResourceMappingConfig(input.config);
|
|
3580
|
+
return await super.updateOfferingIntegrationResourceConfiguration(input, context);
|
|
3581
|
+
}
|
|
3582
|
+
};
|
|
3583
|
+
exports.TrybeIntegrationResourceManagementService = _ts_decorate20([
|
|
3584
|
+
common.Injectable(),
|
|
3585
|
+
_ts_metadata17("design:type", Function),
|
|
3586
|
+
_ts_metadata17("design:paramtypes", [
|
|
3305
3587
|
typeof dvssBackendModuleUtility.LoggerService === "undefined" ? Object : dvssBackendModuleUtility.LoggerService,
|
|
3306
|
-
typeof exports.
|
|
3307
|
-
typeof exports.TrybeAuthService === "undefined" ? Object : exports.TrybeAuthService
|
|
3588
|
+
typeof exports.IntegrationResourceManagementDao === "undefined" ? Object : exports.IntegrationResourceManagementDao
|
|
3308
3589
|
])
|
|
3309
|
-
], exports.
|
|
3590
|
+
], exports.TrybeIntegrationResourceManagementService);
|
|
3310
3591
|
|
|
3311
|
-
// ../../packages/dvss-integration-trybe/src/
|
|
3312
|
-
|
|
3592
|
+
// ../../packages/dvss-integration-trybe/src/models/wellness-management.model.ts
|
|
3593
|
+
var TRYBE_OFFERING_TYPE_ENUM = /* @__PURE__ */ (function(TRYBE_OFFERING_TYPE_ENUM2) {
|
|
3594
|
+
TRYBE_OFFERING_TYPE_ENUM2["APPOINTMENT"] = "APPOINTMENT";
|
|
3595
|
+
TRYBE_OFFERING_TYPE_ENUM2["SESSION"] = "SESSION";
|
|
3596
|
+
TRYBE_OFFERING_TYPE_ENUM2["COURSE"] = "COURSE";
|
|
3597
|
+
return TRYBE_OFFERING_TYPE_ENUM2;
|
|
3598
|
+
})({});
|
|
3599
|
+
var TRYBE_OFFERING_TYPE_API = {
|
|
3600
|
+
APPOINTMENT: "appointment",
|
|
3601
|
+
SESSION: "session",
|
|
3602
|
+
COURSE: "course"
|
|
3603
|
+
};
|
|
3604
|
+
function formatDateForTrybe(date, isStartOfDay, timezone) {
|
|
3313
3605
|
const year = date.getFullYear();
|
|
3314
3606
|
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
3315
3607
|
const day = String(date.getDate()).padStart(2, "0");
|
|
3316
3608
|
const hours = isStartOfDay ? "00" : "23";
|
|
3317
3609
|
const minutes = isStartOfDay ? "00" : "59";
|
|
3318
3610
|
const seconds = isStartOfDay ? "00" : "59";
|
|
3319
|
-
|
|
3611
|
+
let timezoneOffset;
|
|
3612
|
+
if (timezone) {
|
|
3613
|
+
const offsetMinutes = luxonDate_util.getCurrentOffsetFromTimezone(timezone, date);
|
|
3614
|
+
const offsetHours = Math.floor(Math.abs(offsetMinutes) / 60);
|
|
3615
|
+
const offsetMins = Math.abs(offsetMinutes) % 60;
|
|
3616
|
+
const sign = offsetMinutes >= 0 ? "+" : "-";
|
|
3617
|
+
timezoneOffset = `${sign}${String(offsetHours).padStart(2, "0")}:${String(offsetMins).padStart(2, "0")}`;
|
|
3618
|
+
} else {
|
|
3619
|
+
timezoneOffset = "-05:00";
|
|
3620
|
+
}
|
|
3621
|
+
return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}${timezoneOffset}`;
|
|
3320
3622
|
}
|
|
3321
3623
|
__name(formatDateForTrybe, "formatDateForTrybe");
|
|
3322
3624
|
function extractTimeFromIsoString(isoString) {
|
|
@@ -3360,31 +3662,6 @@ var fetchAllPages = /* @__PURE__ */ __name(async (firstPageResponse, shouldFetch
|
|
|
3360
3662
|
}
|
|
3361
3663
|
return items;
|
|
3362
3664
|
}, "fetchAllPages");
|
|
3363
|
-
|
|
3364
|
-
// ../../packages/dvss-integration-trybe/src/models/wellness-management.model.ts
|
|
3365
|
-
var TRYBE_OFFERING_TYPE_ENUM = /* @__PURE__ */ (function(TRYBE_OFFERING_TYPE_ENUM2) {
|
|
3366
|
-
TRYBE_OFFERING_TYPE_ENUM2["APPOINTMENT"] = "APPOINTMENT";
|
|
3367
|
-
TRYBE_OFFERING_TYPE_ENUM2["SESSION"] = "SESSION";
|
|
3368
|
-
TRYBE_OFFERING_TYPE_ENUM2["COURSE"] = "COURSE";
|
|
3369
|
-
return TRYBE_OFFERING_TYPE_ENUM2;
|
|
3370
|
-
})({});
|
|
3371
|
-
var TRYBE_OFFERING_TYPE_API = {
|
|
3372
|
-
APPOINTMENT: "appointment",
|
|
3373
|
-
SESSION: "session",
|
|
3374
|
-
COURSE: "course"
|
|
3375
|
-
};
|
|
3376
|
-
|
|
3377
|
-
// ../../packages/dvss-integration-trybe/src/models/integration-resource-management.model.ts
|
|
3378
|
-
var TRYBE_SUPPORTED_JOURNEYS_ENUM = /* @__PURE__ */ (function(TRYBE_SUPPORTED_JOURNEYS_ENUM2) {
|
|
3379
|
-
TRYBE_SUPPORTED_JOURNEYS_ENUM2["APPOINTMENT"] = "APPOINTMENT";
|
|
3380
|
-
TRYBE_SUPPORTED_JOURNEYS_ENUM2["SESSION"] = "SESSION";
|
|
3381
|
-
TRYBE_SUPPORTED_JOURNEYS_ENUM2["COURSE"] = "COURSE";
|
|
3382
|
-
return TRYBE_SUPPORTED_JOURNEYS_ENUM2;
|
|
3383
|
-
})({});
|
|
3384
|
-
var TRYBE_CATALOGING_BY_ENUM = /* @__PURE__ */ (function(TRYBE_CATALOGING_BY_ENUM2) {
|
|
3385
|
-
TRYBE_CATALOGING_BY_ENUM2["PEOPLE_RESOURCE"] = "PEOPLE_RESOURCE";
|
|
3386
|
-
return TRYBE_CATALOGING_BY_ENUM2;
|
|
3387
|
-
})({});
|
|
3388
3665
|
var TRYBE_WEEKDAYS_MAPPING = {
|
|
3389
3666
|
monday: models.DAY_OF_WEEK.MON,
|
|
3390
3667
|
tuesday: models.DAY_OF_WEEK.TUE,
|
|
@@ -3775,17 +4052,19 @@ function mapTrybeAppointmentAvailabilityToSystemResponse(slots) {
|
|
|
3775
4052
|
};
|
|
3776
4053
|
}
|
|
3777
4054
|
__name(mapTrybeAppointmentAvailabilityToSystemResponse, "mapTrybeAppointmentAvailabilityToSystemResponse");
|
|
3778
|
-
|
|
4055
|
+
|
|
4056
|
+
// ../../packages/dvss-integration-trybe/src/capabilities/wellness/wellness-management.service.ts
|
|
4057
|
+
function _ts_decorate21(decorators, target, key, desc2) {
|
|
3779
4058
|
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
3780
4059
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
3781
4060
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3782
4061
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3783
4062
|
}
|
|
3784
|
-
__name(
|
|
3785
|
-
function
|
|
4063
|
+
__name(_ts_decorate21, "_ts_decorate");
|
|
4064
|
+
function _ts_metadata18(k, v) {
|
|
3786
4065
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3787
4066
|
}
|
|
3788
|
-
__name(
|
|
4067
|
+
__name(_ts_metadata18, "_ts_metadata");
|
|
3789
4068
|
exports.TrybeWellnessManagement = class _TrybeWellnessManagement {
|
|
3790
4069
|
static {
|
|
3791
4070
|
__name(this, "TrybeWellnessManagement");
|
|
@@ -3793,11 +4072,13 @@ exports.TrybeWellnessManagement = class _TrybeWellnessManagement {
|
|
|
3793
4072
|
logger;
|
|
3794
4073
|
trafficGatewayService;
|
|
3795
4074
|
trybeAuthService;
|
|
4075
|
+
integrationCommonDao;
|
|
3796
4076
|
fileName = "wellness-management.service";
|
|
3797
|
-
constructor(logger, trafficGatewayService, trybeAuthService) {
|
|
4077
|
+
constructor(logger, trafficGatewayService, trybeAuthService, integrationCommonDao) {
|
|
3798
4078
|
this.logger = logger;
|
|
3799
4079
|
this.trafficGatewayService = trafficGatewayService;
|
|
3800
4080
|
this.trybeAuthService = trybeAuthService;
|
|
4081
|
+
this.integrationCommonDao = integrationCommonDao;
|
|
3801
4082
|
}
|
|
3802
4083
|
fetchWellnessAppointmentSession() {
|
|
3803
4084
|
throw new Error("Method not implemented.");
|
|
@@ -4491,8 +4772,17 @@ exports.TrybeWellnessManagement = class _TrybeWellnessManagement {
|
|
|
4491
4772
|
try {
|
|
4492
4773
|
const validatedIntegration = this.trybeAuthService.validateConfig(integration, loggedInUserId);
|
|
4493
4774
|
const siteId = validatedIntegration.config.integrationConfig.siteId;
|
|
4494
|
-
const
|
|
4495
|
-
|
|
4775
|
+
const finalTimezone = await this.integrationCommonDao.getTimezoneForRequest({
|
|
4776
|
+
projectId: integration.projectId,
|
|
4777
|
+
loggedInUserId
|
|
4778
|
+
});
|
|
4779
|
+
this.logger.info(loggedInUserId, this.fetchSessionAvailabilityForOffering.name, this.fileName, "Using timezone for date formatting", {
|
|
4780
|
+
timezone: finalTimezone,
|
|
4781
|
+
dateTimeFrom: request.dateTimeFrom,
|
|
4782
|
+
dateTimeTo: request.dateTimeTo
|
|
4783
|
+
});
|
|
4784
|
+
const formattedDateTimeFrom = formatDateForTrybe(request.dateTimeFrom, true, finalTimezone);
|
|
4785
|
+
const formattedDateTimeTo = formatDateForTrybe(request.dateTimeTo, false, finalTimezone);
|
|
4496
4786
|
const apiUrl = `/shop/item-availability/sessions/${siteId}/${request.externalOfferingBookableItemId}?date_time_from=${encodeURIComponent(formattedDateTimeFrom)}&date_time_to=${encodeURIComponent(formattedDateTimeTo)}&offeringId=${request.externalOfferingBookableItemId}`;
|
|
4497
4787
|
const response = await this.trafficGatewayService.executeIntegrationRequest({
|
|
4498
4788
|
apiMethod: HTTP_METHOD.GET,
|
|
@@ -4516,8 +4806,17 @@ exports.TrybeWellnessManagement = class _TrybeWellnessManagement {
|
|
|
4516
4806
|
try {
|
|
4517
4807
|
const validatedIntegration = this.trybeAuthService.validateConfig(integration, loggedInUserId);
|
|
4518
4808
|
const siteId = validatedIntegration.config.integrationConfig.siteId;
|
|
4519
|
-
const
|
|
4520
|
-
|
|
4809
|
+
const finalTimezone = await this.integrationCommonDao.getTimezoneForRequest({
|
|
4810
|
+
projectId: integration.projectId,
|
|
4811
|
+
loggedInUserId
|
|
4812
|
+
});
|
|
4813
|
+
this.logger.info(loggedInUserId, this.fetchSessionAvailabilityForOffering.name, this.fileName, "Using timezone for date formatting", {
|
|
4814
|
+
timezone: finalTimezone,
|
|
4815
|
+
dateTimeFrom: request.dateTimeFrom,
|
|
4816
|
+
dateTimeTo: request.dateTimeTo
|
|
4817
|
+
});
|
|
4818
|
+
const formattedDateTimeFrom = formatDateForTrybe(request.dateTimeFrom, true, finalTimezone);
|
|
4819
|
+
const formattedDateTimeTo = formatDateForTrybe(request.dateTimeTo, false, finalTimezone);
|
|
4521
4820
|
const apiUrl = `/shop/item-availability/appointment-slots/${siteId}/${request.externalOfferingBookableItemId}?date_time_from=${encodeURIComponent(formattedDateTimeFrom)}&date_time_to=${encodeURIComponent(formattedDateTimeTo)}&OfferingID=${request.externalOfferingBookableItemId}`;
|
|
4522
4821
|
const response = await this.trafficGatewayService.executeIntegrationRequest({
|
|
4523
4822
|
apiMethod: HTTP_METHOD.GET,
|
|
@@ -4547,215 +4846,35 @@ exports.TrybeWellnessManagement = class _TrybeWellnessManagement {
|
|
|
4547
4846
|
}
|
|
4548
4847
|
}
|
|
4549
4848
|
};
|
|
4550
|
-
exports.TrybeWellnessManagement =
|
|
4849
|
+
exports.TrybeWellnessManagement = _ts_decorate21([
|
|
4551
4850
|
common.Injectable(),
|
|
4552
|
-
|
|
4553
|
-
|
|
4851
|
+
_ts_metadata18("design:type", Function),
|
|
4852
|
+
_ts_metadata18("design:paramtypes", [
|
|
4554
4853
|
typeof dvssBackendModuleUtility.LoggerService === "undefined" ? Object : dvssBackendModuleUtility.LoggerService,
|
|
4555
4854
|
typeof exports.TrafficGatewayService === "undefined" ? Object : exports.TrafficGatewayService,
|
|
4556
|
-
typeof exports.TrybeAuthService === "undefined" ? Object : exports.TrybeAuthService
|
|
4557
|
-
])
|
|
4558
|
-
], exports.TrybeWellnessManagement);
|
|
4559
|
-
|
|
4560
|
-
// ../../packages/dvss-integration-trybe/src/capabilities/integration-configuration/integration-configuration.mapper.ts
|
|
4561
|
-
function mapTrybeSiteResponseToSystem(response) {
|
|
4562
|
-
return {
|
|
4563
|
-
customPaymentTypes: response.data?.custom_payment_types?.map((paymentType) => ({
|
|
4564
|
-
id: paymentType.id,
|
|
4565
|
-
name: paymentType.name,
|
|
4566
|
-
kind: paymentType.kind
|
|
4567
|
-
}))
|
|
4568
|
-
};
|
|
4569
|
-
}
|
|
4570
|
-
__name(mapTrybeSiteResponseToSystem, "mapTrybeSiteResponseToSystem");
|
|
4571
|
-
|
|
4572
|
-
// ../../packages/dvss-integration-trybe/src/capabilities/integration-configuration/integration-configuration.service.ts
|
|
4573
|
-
function _ts_decorate19(decorators, target, key, desc2) {
|
|
4574
|
-
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
4575
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
4576
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4577
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4578
|
-
}
|
|
4579
|
-
__name(_ts_decorate19, "_ts_decorate");
|
|
4580
|
-
function _ts_metadata16(k, v) {
|
|
4581
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4582
|
-
}
|
|
4583
|
-
__name(_ts_metadata16, "_ts_metadata");
|
|
4584
|
-
exports.TrybeIntegrationConfigurationService = class TrybeIntegrationConfigurationService extends exports.BaseIntegrationConfiguration {
|
|
4585
|
-
static {
|
|
4586
|
-
__name(this, "TrybeIntegrationConfigurationService");
|
|
4587
|
-
}
|
|
4588
|
-
trybeAuthService;
|
|
4589
|
-
trafficGatewayService;
|
|
4590
|
-
constructor(integrationConfigurationDao, commonValidationDatabaseService, logger, trybeAuthService, trafficGatewayService) {
|
|
4591
|
-
super(integrationConfigurationDao, commonValidationDatabaseService, logger), this.trybeAuthService = trybeAuthService, this.trafficGatewayService = trafficGatewayService;
|
|
4592
|
-
}
|
|
4593
|
-
/**
|
|
4594
|
-
* Add capability integration: validate Trybe config, then configuredFor (offering), then delegate to base.
|
|
4595
|
-
*/
|
|
4596
|
-
async addCapabilityIntegration(input, context) {
|
|
4597
|
-
this.trybeAuthService.validateConfig({
|
|
4598
|
-
config: input.config
|
|
4599
|
-
}, context.loggedInUserId);
|
|
4600
|
-
if (input.configuredFor != null) {
|
|
4601
|
-
await this.validateCapabilityIntegrationConfiguredForInput(input.configuredFor, input.projectId);
|
|
4602
|
-
}
|
|
4603
|
-
return super.addCapabilityIntegration(input, context);
|
|
4604
|
-
}
|
|
4605
|
-
/**
|
|
4606
|
-
* Update capability integration: convert to new signature and delegate to base.
|
|
4607
|
-
*/
|
|
4608
|
-
async updateCapabilityIntegration(request, integration, loggedInUserId) {
|
|
4609
|
-
if (request.updateData.config) {
|
|
4610
|
-
this.trybeAuthService.validateConfig({
|
|
4611
|
-
config: request.updateData.config
|
|
4612
|
-
}, loggedInUserId);
|
|
4613
|
-
}
|
|
4614
|
-
return super.updateCapabilityIntegration(request, integration, loggedInUserId);
|
|
4615
|
-
}
|
|
4616
|
-
/**
|
|
4617
|
-
* Validates configuredFor (offering exists and belongs to project). Same as project-ms validateCapabilityIntegrationConfiguredForInput.
|
|
4618
|
-
*/
|
|
4619
|
-
async validateCapabilityIntegrationConfiguredForInput(configuredFor, projectId) {
|
|
4620
|
-
if (configuredFor.configuredForType !== models.CONFIGURED_FOR_TYPE_ENUM.OFFERING) {
|
|
4621
|
-
throw new Error(`configuredForType not supported: ${configuredFor.configuredForType}`);
|
|
4622
|
-
}
|
|
4623
|
-
await this.commonValidationDatabaseService.getOffering({
|
|
4624
|
-
offeringId: configuredFor.configuredForId,
|
|
4625
|
-
projectId
|
|
4626
|
-
});
|
|
4627
|
-
}
|
|
4628
|
-
/**
|
|
4629
|
-
* Trybe 3rd party: GET /shop/sites/{siteId} via executeIntegrationRequest.
|
|
4630
|
-
*/
|
|
4631
|
-
async getSiteDetailedInformation(integration, loggedInUserId) {
|
|
4632
|
-
const validatedIntegration = this.trybeAuthService.validateConfig(integration, loggedInUserId);
|
|
4633
|
-
const siteId = validatedIntegration.config.integrationConfig.siteId;
|
|
4634
|
-
const url = `/shop/sites/${siteId}`;
|
|
4635
|
-
const response = await this.trafficGatewayService.executeIntegrationRequest({
|
|
4636
|
-
apiMethod: HTTP_METHOD.GET,
|
|
4637
|
-
url,
|
|
4638
|
-
baseUrl: validatedIntegration.config.platformConfig.baseUrl,
|
|
4639
|
-
headers: validatedIntegration.headers
|
|
4640
|
-
}, validatedIntegration, loggedInUserId);
|
|
4641
|
-
return mapTrybeSiteResponseToSystem(response);
|
|
4642
|
-
}
|
|
4643
|
-
};
|
|
4644
|
-
exports.TrybeIntegrationConfigurationService = _ts_decorate19([
|
|
4645
|
-
common.Injectable(),
|
|
4646
|
-
_ts_metadata16("design:type", Function),
|
|
4647
|
-
_ts_metadata16("design:paramtypes", [
|
|
4648
|
-
typeof exports.IntegrationConfigurationDao === "undefined" ? Object : exports.IntegrationConfigurationDao,
|
|
4649
|
-
typeof dvssBackendModuleDatastore.CommonValidationDatabaseService === "undefined" ? Object : dvssBackendModuleDatastore.CommonValidationDatabaseService,
|
|
4650
|
-
typeof dvssBackendModuleUtility.LoggerService === "undefined" ? Object : dvssBackendModuleUtility.LoggerService,
|
|
4651
4855
|
typeof exports.TrybeAuthService === "undefined" ? Object : exports.TrybeAuthService,
|
|
4652
|
-
typeof exports.
|
|
4653
|
-
])
|
|
4654
|
-
], exports.TrybeIntegrationConfigurationService);
|
|
4655
|
-
function _ts_decorate20(decorators, target, key, desc2) {
|
|
4656
|
-
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
4657
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
4658
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4659
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4660
|
-
}
|
|
4661
|
-
__name(_ts_decorate20, "_ts_decorate");
|
|
4662
|
-
function _ts_metadata17(k, v) {
|
|
4663
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4664
|
-
}
|
|
4665
|
-
__name(_ts_metadata17, "_ts_metadata");
|
|
4666
|
-
var OFFERING_INTEGRATION_MAPPING_ALREADY_EXISTS = "OFFERING_INTEGRATION_MAPPING_ALREADY_EXISTS";
|
|
4667
|
-
var VALID_JOURNEY_VALUES = /* @__PURE__ */ new Set([
|
|
4668
|
-
"SESSION",
|
|
4669
|
-
"COURSE",
|
|
4670
|
-
"APPOINTMENT"
|
|
4671
|
-
]);
|
|
4672
|
-
exports.TrybeIntegrationResourceManagementService = class TrybeIntegrationResourceManagementService extends BaseIntegrationResourceManagement {
|
|
4673
|
-
static {
|
|
4674
|
-
__name(this, "TrybeIntegrationResourceManagementService");
|
|
4675
|
-
}
|
|
4676
|
-
constructor(logger, integrationResourceManagementDao) {
|
|
4677
|
-
super(integrationResourceManagementDao, logger);
|
|
4678
|
-
}
|
|
4679
|
-
/**
|
|
4680
|
-
* Validates Trybe resource mapping config (same rules as MS trybe-offering-integration-management.service).
|
|
4681
|
-
* @throws CustomException BAD_REQUEST if config is invalid
|
|
4682
|
-
*/
|
|
4683
|
-
validateResourceMappingConfig(config3) {
|
|
4684
|
-
const resourceMappingConfig = config3;
|
|
4685
|
-
if (!resourceMappingConfig.supportedJourneys || resourceMappingConfig.supportedJourneys.length === 0) {
|
|
4686
|
-
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, "Invalid Trybe resource mapping config: supportedJourneys required and must be non-empty");
|
|
4687
|
-
}
|
|
4688
|
-
if (!resourceMappingConfig.catalogingBy || // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
4689
|
-
resourceMappingConfig.catalogingBy !== TRYBE_CATALOGING_BY_ENUM.PEOPLE_RESOURCE) {
|
|
4690
|
-
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, "Invalid Trybe resource mapping config: catalogingBy must be PEOPLE_RESOURCE");
|
|
4691
|
-
}
|
|
4692
|
-
if (!resourceMappingConfig.supportedJourneys.some((journey) => VALID_JOURNEY_VALUES.has(journey))) {
|
|
4693
|
-
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, "Invalid Trybe resource mapping config: supportedJourneys must contain at least one of SESSION, COURSE, APPOINTMENT");
|
|
4694
|
-
}
|
|
4695
|
-
if (resourceMappingConfig.supportedJourneys.some((journey) => !VALID_JOURNEY_VALUES.has(journey))) {
|
|
4696
|
-
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, "Invalid Trybe resource mapping config: supportedJourneys may only contain SESSION, COURSE, APPOINTMENT");
|
|
4697
|
-
}
|
|
4698
|
-
if (!resourceMappingConfig.paymentType || typeof resourceMappingConfig.paymentType !== "string") {
|
|
4699
|
-
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, "Invalid Trybe resource mapping config: paymentType required and must be a string");
|
|
4700
|
-
}
|
|
4701
|
-
}
|
|
4702
|
-
async addResourceToIntegration(input, context) {
|
|
4703
|
-
if (input.config != null && typeof input.config === "object") {
|
|
4704
|
-
this.validateResourceMappingConfig(input.config);
|
|
4705
|
-
}
|
|
4706
|
-
const isMappingExists = await this.integrationResourceManagementDao.checkMappingExists({
|
|
4707
|
-
capabilityIntegrationId: input.capabilityIntegrationId,
|
|
4708
|
-
configuredForId: input.offeringId,
|
|
4709
|
-
configuredForType: models.CONFIGURED_FOR_TYPE_ENUM.OFFERING
|
|
4710
|
-
}, context.loggedInUserId);
|
|
4711
|
-
if (isMappingExists) {
|
|
4712
|
-
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, OFFERING_INTEGRATION_MAPPING_ALREADY_EXISTS);
|
|
4713
|
-
}
|
|
4714
|
-
return super.addResourceToIntegration(input, context);
|
|
4715
|
-
}
|
|
4716
|
-
async removeResourceFromIntegration(request, context) {
|
|
4717
|
-
const isMappingExists = await this.integrationResourceManagementDao.checkMappingExists({
|
|
4718
|
-
capabilityIntegrationId: request.capabilityIntegrationId,
|
|
4719
|
-
configuredForId: request.offeringId,
|
|
4720
|
-
configuredForType: models.CONFIGURED_FOR_TYPE_ENUM.OFFERING
|
|
4721
|
-
}, context.loggedInUserId);
|
|
4722
|
-
if (!isMappingExists) {
|
|
4723
|
-
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, "Mapping not found");
|
|
4724
|
-
}
|
|
4725
|
-
return super.removeResourceFromIntegration(request, context);
|
|
4726
|
-
}
|
|
4727
|
-
async updateOfferingIntegrationResourceConfiguration(input, context) {
|
|
4728
|
-
const resourceMapping = await this.integrationResourceManagementDao.getCapabilityIntegrationResourceMappingById(input.id, context.loggedInUserId);
|
|
4729
|
-
if (!resourceMapping) {
|
|
4730
|
-
throw new dvssBackendModuleUtility.CustomException(dvssBackendModuleUtility.ERROR_NAMES.BAD_REQUEST, "Resource mapping not found");
|
|
4731
|
-
}
|
|
4732
|
-
this.validateResourceMappingConfig(input.config);
|
|
4733
|
-
return await super.updateOfferingIntegrationResourceConfiguration(input, context);
|
|
4734
|
-
}
|
|
4735
|
-
};
|
|
4736
|
-
exports.TrybeIntegrationResourceManagementService = _ts_decorate20([
|
|
4737
|
-
common.Injectable(),
|
|
4738
|
-
_ts_metadata17("design:type", Function),
|
|
4739
|
-
_ts_metadata17("design:paramtypes", [
|
|
4740
|
-
typeof dvssBackendModuleUtility.LoggerService === "undefined" ? Object : dvssBackendModuleUtility.LoggerService,
|
|
4741
|
-
typeof exports.IntegrationResourceManagementDao === "undefined" ? Object : exports.IntegrationResourceManagementDao
|
|
4856
|
+
typeof exports.IntegrationCommonDao === "undefined" ? Object : exports.IntegrationCommonDao
|
|
4742
4857
|
])
|
|
4743
|
-
], exports.
|
|
4858
|
+
], exports.TrybeWellnessManagement);
|
|
4859
|
+
var rootEnvPath2 = path.resolve(__dirname, "../../../.env");
|
|
4860
|
+
dotenv.config({
|
|
4861
|
+
path: rootEnvPath2
|
|
4862
|
+
});
|
|
4744
4863
|
|
|
4745
4864
|
// ../../packages/dvss-integration-trybe/src/app.module.ts
|
|
4746
|
-
function
|
|
4865
|
+
function _ts_decorate22(decorators, target, key, desc2) {
|
|
4747
4866
|
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
4748
4867
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
4749
4868
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4750
4869
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4751
4870
|
}
|
|
4752
|
-
__name(
|
|
4871
|
+
__name(_ts_decorate22, "_ts_decorate");
|
|
4753
4872
|
exports.IntegrationTrybeModule = class AppModule2 {
|
|
4754
4873
|
static {
|
|
4755
4874
|
__name(this, "AppModule");
|
|
4756
4875
|
}
|
|
4757
4876
|
};
|
|
4758
|
-
exports.IntegrationTrybeModule =
|
|
4877
|
+
exports.IntegrationTrybeModule = _ts_decorate22([
|
|
4759
4878
|
common.Module({
|
|
4760
4879
|
imports: [
|
|
4761
4880
|
// Load environment variables from root .env file
|
|
@@ -4769,16 +4888,17 @@ exports.IntegrationTrybeModule = _ts_decorate21([
|
|
|
4769
4888
|
dvssBackendModuleDatastore.DatastoreModule
|
|
4770
4889
|
],
|
|
4771
4890
|
controllers: [
|
|
4772
|
-
|
|
4891
|
+
AppController3
|
|
4773
4892
|
],
|
|
4774
4893
|
providers: [
|
|
4775
|
-
|
|
4894
|
+
AppService3,
|
|
4776
4895
|
exports.TrybeAuthService,
|
|
4777
4896
|
exports.TrybeCustomerManagement,
|
|
4778
4897
|
exports.TrybeCreditBooking,
|
|
4779
4898
|
exports.TrybeWellnessManagement,
|
|
4780
4899
|
exports.IntegrationConfigurationDao,
|
|
4781
4900
|
exports.IntegrationResourceManagementDao,
|
|
4901
|
+
exports.IntegrationCommonDao,
|
|
4782
4902
|
exports.IntegrationRequestLoggerService,
|
|
4783
4903
|
exports.RateLimiterService,
|
|
4784
4904
|
exports.TrafficGatewayService,
|
|
@@ -4800,19 +4920,19 @@ exports.IntegrationTrybeModule = _ts_decorate21([
|
|
|
4800
4920
|
], exports.IntegrationTrybeModule);
|
|
4801
4921
|
|
|
4802
4922
|
// src/app.module.ts
|
|
4803
|
-
function
|
|
4923
|
+
function _ts_decorate23(decorators, target, key, desc2) {
|
|
4804
4924
|
var c = arguments.length, r = c < 3 ? target : desc2 === null ? desc2 = Object.getOwnPropertyDescriptor(target, key) : desc2, d;
|
|
4805
4925
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc2);
|
|
4806
4926
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4807
4927
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4808
4928
|
}
|
|
4809
|
-
__name(
|
|
4929
|
+
__name(_ts_decorate23, "_ts_decorate");
|
|
4810
4930
|
exports.OfferingIntegrationManager = class AppModule3 {
|
|
4811
4931
|
static {
|
|
4812
4932
|
__name(this, "AppModule");
|
|
4813
4933
|
}
|
|
4814
4934
|
};
|
|
4815
|
-
exports.OfferingIntegrationManager =
|
|
4935
|
+
exports.OfferingIntegrationManager = _ts_decorate23([
|
|
4816
4936
|
common.Module({
|
|
4817
4937
|
imports: [
|
|
4818
4938
|
exports.IntegrationTrybeModule,
|