mblabs-roccato-backend-commons 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/database/entities/account.d.ts +2 -2
- package/dist/database/entities/account.js +2 -2
- package/dist/database/entities/index.d.ts +2 -2
- package/dist/database/entities/index.js +2 -2
- package/dist/database/migrations/1748448589743-CreateProfilesTable.js +1 -1
- package/dist/database/migrations/1748448589934-CreateAccountsTable.js +1 -1
- package/dist/database/migrations/1748448590133-CreateLeadsTable.js +1 -1
- package/dist/database/migrations/1748448590361-CreateLeadResponsiblesTable.js +1 -1
- package/dist/database/migrations/index.d.ts +2 -5
- package/dist/database/migrations/index.js +13 -19
- package/dist/services/aws/cloudwatch.d.ts +1 -1
- package/dist/services/aws/index.d.ts +4 -4
- package/dist/services/aws/index.js +4 -4
- package/dist/services/aws/pinpoint.d.ts +1 -1
- package/dist/services/aws/s3.d.ts +1 -1
- package/dist/services/aws/s3.js +1 -1
- package/dist/services/aws/secret-manager.d.ts +1 -1
- package/dist/services/aws/secret-manager.js +1 -1
- package/dist/services/azure/application-insights.d.ts +1 -1
- package/dist/services/azure/communication.d.ts +1 -1
- package/dist/services/azure/index.d.ts +4 -4
- package/dist/services/azure/index.js +4 -4
- package/dist/services/azure/keyvault.d.ts +1 -1
- package/dist/services/azure/keyvault.js +1 -1
- package/dist/services/azure/storage-blob.d.ts +1 -1
- package/dist/services/azure/storage-blob.js +2 -2
- package/dist/services/file.js +1 -1
- package/dist/services/firebase.d.ts +1 -1
- package/dist/services/gcp/drive.d.ts +1 -1
- package/dist/services/gcp/index.d.ts +3 -3
- package/dist/services/gcp/index.js +3 -3
- package/dist/services/gcp/secrets.d.ts +1 -1
- package/dist/services/gcp/secrets.js +1 -1
- package/dist/services/gcp/sheets.d.ts +1 -1
- package/dist/services/grafana.d.ts +1 -1
- package/dist/services/grafana.js +1 -1
- package/dist/services/http.d.ts +1 -1
- package/dist/services/index.d.ts +11 -11
- package/dist/services/index.js +11 -11
- package/dist/services/keycloak.d.ts +1 -1
- package/dist/services/keycloak.js +1 -1
- package/dist/services/rabbit.d.ts +1 -1
- package/dist/services/redis.d.ts +1 -2
- package/dist/services/sendgrid.d.ts +1 -1
- package/package.json +2 -2
- package/src/database/entities/account.ts +2 -2
- package/src/database/entities/index.ts +2 -2
- package/src/database/migrations/1748448589743-CreateProfilesTable.ts +1 -1
- package/src/database/migrations/1748448589934-CreateAccountsTable.ts +1 -1
- package/src/database/migrations/1748448590133-CreateLeadsTable.ts +1 -1
- package/src/database/migrations/1748448590361-CreateLeadResponsiblesTable.ts +1 -1
- package/src/database/migrations/index.ts +13 -5
- package/src/services/aws/cloudwatch.ts +1 -1
- package/src/services/aws/index.ts +4 -4
- package/src/services/aws/pinpoint.ts +1 -1
- package/src/services/aws/s3.ts +2 -3
- package/src/services/aws/secret-manager.ts +2 -3
- package/src/services/azure/application-insights.ts +1 -1
- package/src/services/azure/communication.ts +1 -1
- package/src/services/azure/index.ts +4 -4
- package/src/services/azure/keyvault.ts +2 -3
- package/src/services/azure/storage-blob.ts +3 -4
- package/src/services/file.ts +1 -1
- package/src/services/firebase.ts +1 -1
- package/src/services/gcp/drive.ts +1 -1
- package/src/services/gcp/index.ts +3 -3
- package/src/services/gcp/secrets.ts +2 -3
- package/src/services/gcp/sheets.ts +1 -1
- package/src/services/grafana.ts +2 -3
- package/src/services/http.ts +1 -1
- package/src/services/index.ts +11 -11
- package/src/services/keycloak.ts +2 -3
- package/src/services/rabbit.ts +1 -1
- package/src/services/redis.ts +1 -2
- package/src/services/sendgrid.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import BaseEntity from '
|
|
2
|
-
import ProfileEntity from '
|
|
1
|
+
import BaseEntity from './base';
|
|
2
|
+
import ProfileEntity from './profile';
|
|
3
3
|
export default class AccountEntity extends BaseEntity {
|
|
4
4
|
tenantId?: string;
|
|
5
5
|
name?: string;
|
|
@@ -13,8 +13,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
|
-
const base_1 = __importDefault(require("
|
|
17
|
-
const profile_1 = __importDefault(require("
|
|
16
|
+
const base_1 = __importDefault(require("./base"));
|
|
17
|
+
const profile_1 = __importDefault(require("./profile"));
|
|
18
18
|
let AccountEntity = class AccountEntity extends base_1.default {
|
|
19
19
|
constructor(partial) {
|
|
20
20
|
super();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import AccountEntity from '
|
|
2
|
-
import ProfileEntity from '
|
|
1
|
+
import AccountEntity from './account';
|
|
2
|
+
import ProfileEntity from './profile';
|
|
3
3
|
export { AccountEntity, ProfileEntity, };
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ProfileEntity = exports.AccountEntity = void 0;
|
|
7
|
-
const account_1 = __importDefault(require("
|
|
7
|
+
const account_1 = __importDefault(require("./account"));
|
|
8
8
|
exports.AccountEntity = account_1.default;
|
|
9
|
-
const profile_1 = __importDefault(require("
|
|
9
|
+
const profile_1 = __importDefault(require("./profile"));
|
|
10
10
|
exports.ProfileEntity = profile_1.default;
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.CreateProfilesTable1748448589743 = void 0;
|
|
16
16
|
const typeorm_1 = require("typeorm");
|
|
17
|
-
const utils_1 = __importDefault(require("
|
|
17
|
+
const utils_1 = __importDefault(require("../utils"));
|
|
18
18
|
class CreateProfilesTable1748448589743 {
|
|
19
19
|
up(queryRunner) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.CreateAccountsTable1748448589934 = void 0;
|
|
16
16
|
const typeorm_1 = require("typeorm");
|
|
17
|
-
const utils_1 = __importDefault(require("
|
|
17
|
+
const utils_1 = __importDefault(require("../utils"));
|
|
18
18
|
class CreateAccountsTable1748448589934 {
|
|
19
19
|
up(queryRunner) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.CreateLeadsTable1748448590133 = void 0;
|
|
16
16
|
const typeorm_1 = require("typeorm");
|
|
17
|
-
const utils_1 = __importDefault(require("
|
|
17
|
+
const utils_1 = __importDefault(require("../utils"));
|
|
18
18
|
class CreateLeadsTable1748448590133 {
|
|
19
19
|
up(queryRunner) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.CreateLeadResponsiblesTable1748448590361 = void 0;
|
|
16
16
|
const typeorm_1 = require("typeorm");
|
|
17
|
-
const utils_1 = __importDefault(require("
|
|
17
|
+
const utils_1 = __importDefault(require("../utils"));
|
|
18
18
|
class CreateLeadResponsiblesTable1748448590361 {
|
|
19
19
|
up(queryRunner) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export * from './1748448589934-CreateAccountsTable';
|
|
4
|
-
export * from './1748448590133-CreateLeadsTable';
|
|
5
|
-
export * from './1748448590361-CreateLeadResponsiblesTable';
|
|
1
|
+
import { Init1748448461165 } from './1748448461165-Init';
|
|
2
|
+
export declare const Migrations: (typeof Init1748448461165)[];
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
exports.Migrations = void 0;
|
|
4
|
+
const _1748448461165_Init_1 = require("./1748448461165-Init");
|
|
5
|
+
const _1748448589743_CreateProfilesTable_1 = require("./1748448589743-CreateProfilesTable");
|
|
6
|
+
const _1748448589934_CreateAccountsTable_1 = require("./1748448589934-CreateAccountsTable");
|
|
7
|
+
const _1748448590133_CreateLeadsTable_1 = require("./1748448590133-CreateLeadsTable");
|
|
8
|
+
const _1748448590361_CreateLeadResponsiblesTable_1 = require("./1748448590361-CreateLeadResponsiblesTable");
|
|
9
|
+
exports.Migrations = [
|
|
10
|
+
_1748448461165_Init_1.Init1748448461165,
|
|
11
|
+
_1748448589743_CreateProfilesTable_1.CreateProfilesTable1748448589743,
|
|
12
|
+
_1748448589934_CreateAccountsTable_1.CreateAccountsTable1748448589934,
|
|
13
|
+
_1748448590133_CreateLeadsTable_1.CreateLeadsTable1748448590133,
|
|
14
|
+
_1748448590361_CreateLeadResponsiblesTable_1.CreateLeadResponsiblesTable1748448590361,
|
|
15
|
+
];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AmazonCloudwatch, IAmazonCloudwatchService } from '
|
|
1
|
+
import { AmazonCloudwatch, IAmazonCloudwatchService } from '../../interfaces/aws';
|
|
2
2
|
declare class AmazonCloudwatchService implements IAmazonCloudwatchService {
|
|
3
3
|
createLogEvent(req: AmazonCloudwatch.CreateLogEvent.Request): Promise<void>;
|
|
4
4
|
private getLogGroupByName;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import AmazonCloudwatchService from '
|
|
2
|
-
import AmazonPinpointService from '
|
|
3
|
-
import AmazonS3Service from '
|
|
4
|
-
import AmazonSecretManagerService from '
|
|
1
|
+
import AmazonCloudwatchService from '../../services/aws/cloudwatch';
|
|
2
|
+
import AmazonPinpointService from '../../services/aws/pinpoint';
|
|
3
|
+
import AmazonS3Service from '../../services/aws/s3';
|
|
4
|
+
import AmazonSecretManagerService from '../../services/aws/secret-manager';
|
|
5
5
|
export { AmazonCloudwatchService, AmazonPinpointService, AmazonS3Service, AmazonSecretManagerService, };
|
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.AmazonSecretManagerService = exports.AmazonS3Service = exports.AmazonPinpointService = exports.AmazonCloudwatchService = void 0;
|
|
7
|
-
const cloudwatch_1 = __importDefault(require("
|
|
7
|
+
const cloudwatch_1 = __importDefault(require("../../services/aws/cloudwatch"));
|
|
8
8
|
exports.AmazonCloudwatchService = cloudwatch_1.default;
|
|
9
|
-
const pinpoint_1 = __importDefault(require("
|
|
9
|
+
const pinpoint_1 = __importDefault(require("../../services/aws/pinpoint"));
|
|
10
10
|
exports.AmazonPinpointService = pinpoint_1.default;
|
|
11
|
-
const s3_1 = __importDefault(require("
|
|
11
|
+
const s3_1 = __importDefault(require("../../services/aws/s3"));
|
|
12
12
|
exports.AmazonS3Service = s3_1.default;
|
|
13
|
-
const secret_manager_1 = __importDefault(require("
|
|
13
|
+
const secret_manager_1 = __importDefault(require("../../services/aws/secret-manager"));
|
|
14
14
|
exports.AmazonSecretManagerService = secret_manager_1.default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AmazonPinpoint, IAmazonPinpointService } from '
|
|
1
|
+
import { AmazonPinpoint, IAmazonPinpointService } from '../../interfaces/aws';
|
|
2
2
|
declare class AmazonPinpointService implements IAmazonPinpointService {
|
|
3
3
|
sendMail(req: AmazonPinpoint.SendMail.Request): Promise<void>;
|
|
4
4
|
sendTemplateMail(req: AmazonPinpoint.SendTemplateMail.Request): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AmazonS3, IAmazonS3Service } from '
|
|
1
|
+
import { AmazonS3, IAmazonS3Service } from '../../interfaces/aws';
|
|
2
2
|
declare class AmazonS3Service implements IAmazonS3Service {
|
|
3
3
|
uploadBase64(req: AmazonS3.UploadBase64.Request): Promise<AmazonS3.UploadBase64.Response>;
|
|
4
4
|
uploadBuffer(req: AmazonS3.UploadBuffer.Request): Promise<AmazonS3.UploadBuffer.Response>;
|
package/dist/services/aws/s3.js
CHANGED
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
16
16
|
const s3_request_presigner_1 = require("@aws-sdk/s3-request-presigner");
|
|
17
|
-
const file_1 = __importDefault(require("
|
|
17
|
+
const file_1 = __importDefault(require("../../services/file"));
|
|
18
18
|
class AmazonS3Service {
|
|
19
19
|
uploadBase64(req) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AmazonSecretManager, IAmazonSecretManagerService } from '
|
|
1
|
+
import { AmazonSecretManager, IAmazonSecretManagerService } from '../../interfaces/aws';
|
|
2
2
|
declare class AmazonSecretManagerService implements IAmazonSecretManagerService {
|
|
3
3
|
getSecret<T>(req: AmazonSecretManager.GetSecret.Request): Promise<AmazonSecretManager.GetSecret.Response<T>>;
|
|
4
4
|
}
|
|
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const client_secrets_manager_1 = require("@aws-sdk/client-secrets-manager");
|
|
16
|
-
const parse_secret_1 = __importDefault(require("
|
|
16
|
+
const parse_secret_1 = __importDefault(require("../../utils/parse-secret"));
|
|
17
17
|
class AmazonSecretManagerService {
|
|
18
18
|
getSecret(req) {
|
|
19
19
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AzureApplicationInsights, IAzureApplicationInsightsService } from '
|
|
1
|
+
import { AzureApplicationInsights, IAzureApplicationInsightsService } from '../../interfaces/azure';
|
|
2
2
|
declare class AzureApplicationInsightsService implements IAzureApplicationInsightsService {
|
|
3
3
|
trackTrace(req: AzureApplicationInsights.TrackTrace.Request): Promise<void>;
|
|
4
4
|
trackEvent(req: AzureApplicationInsights.TrackEvent.Request): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AzureCommunication, IAzureCommunicationService } from '
|
|
1
|
+
import { AzureCommunication, IAzureCommunicationService } from '../../interfaces/azure';
|
|
2
2
|
declare class AzureCommunicationService implements IAzureCommunicationService {
|
|
3
3
|
sendMail(req: AzureCommunication.SendMail.Request): Promise<void>;
|
|
4
4
|
sendTemplateMail(req: AzureCommunication.SendTemplateMail.Request): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import AzureApplicationInsightsService from '
|
|
2
|
-
import AzureCommunicationService from '
|
|
3
|
-
import AzureKeyVaultService from '
|
|
4
|
-
import AzureStorageBlobService from '
|
|
1
|
+
import AzureApplicationInsightsService from '../../services/azure/application-insights';
|
|
2
|
+
import AzureCommunicationService from '../../services/azure/communication';
|
|
3
|
+
import AzureKeyVaultService from '../../services/azure/keyvault';
|
|
4
|
+
import AzureStorageBlobService from '../../services/azure/storage-blob';
|
|
5
5
|
export { AzureApplicationInsightsService, AzureCommunicationService, AzureKeyVaultService, AzureStorageBlobService, };
|
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.AzureStorageBlobService = exports.AzureKeyVaultService = exports.AzureCommunicationService = exports.AzureApplicationInsightsService = void 0;
|
|
7
|
-
const application_insights_1 = __importDefault(require("
|
|
7
|
+
const application_insights_1 = __importDefault(require("../../services/azure/application-insights"));
|
|
8
8
|
exports.AzureApplicationInsightsService = application_insights_1.default;
|
|
9
|
-
const communication_1 = __importDefault(require("
|
|
9
|
+
const communication_1 = __importDefault(require("../../services/azure/communication"));
|
|
10
10
|
exports.AzureCommunicationService = communication_1.default;
|
|
11
|
-
const keyvault_1 = __importDefault(require("
|
|
11
|
+
const keyvault_1 = __importDefault(require("../../services/azure/keyvault"));
|
|
12
12
|
exports.AzureKeyVaultService = keyvault_1.default;
|
|
13
|
-
const storage_blob_1 = __importDefault(require("
|
|
13
|
+
const storage_blob_1 = __importDefault(require("../../services/azure/storage-blob"));
|
|
14
14
|
exports.AzureStorageBlobService = storage_blob_1.default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AzureKeyVault, IAzureKeyVaultService } from '
|
|
1
|
+
import { AzureKeyVault, IAzureKeyVaultService } from '../../interfaces/azure';
|
|
2
2
|
declare class AzureKeyVaultService implements IAzureKeyVaultService {
|
|
3
3
|
getSecret<T>(req: AzureKeyVault.GetSecret.Request): Promise<AzureKeyVault.GetSecret.Response<T>>;
|
|
4
4
|
}
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const identity_1 = require("@azure/identity");
|
|
16
16
|
const keyvault_secrets_1 = require("@azure/keyvault-secrets");
|
|
17
|
-
const parse_secret_1 = __importDefault(require("
|
|
17
|
+
const parse_secret_1 = __importDefault(require("../../utils/parse-secret"));
|
|
18
18
|
class AzureKeyVaultService {
|
|
19
19
|
getSecret(req) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AzureStorageBlob, IAzureStorageBlobService } from '
|
|
1
|
+
import { AzureStorageBlob, IAzureStorageBlobService } from '../../interfaces/azure';
|
|
2
2
|
declare class AzureStorageBlobService implements IAzureStorageBlobService {
|
|
3
3
|
uploadBuffer(req: AzureStorageBlob.UploadBuffer.Request): Promise<void>;
|
|
4
4
|
downloadBuffer(req: AzureStorageBlob.DownloadBuffer.Request): Promise<AzureStorageBlob.DownloadBuffer.Response>;
|
|
@@ -13,8 +13,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const storage_blob_1 = require("@azure/storage-blob");
|
|
16
|
-
const date_1 = __importDefault(require("
|
|
17
|
-
const file_1 = __importDefault(require("
|
|
16
|
+
const date_1 = __importDefault(require("../../services/date"));
|
|
17
|
+
const file_1 = __importDefault(require("../../services/file"));
|
|
18
18
|
class AzureStorageBlobService {
|
|
19
19
|
uploadBuffer(req) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
package/dist/services/file.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const fs_1 = require("fs");
|
|
7
|
-
const date_1 = __importDefault(require("
|
|
7
|
+
const date_1 = __importDefault(require("../services/date"));
|
|
8
8
|
class FileService {
|
|
9
9
|
readTemplate(path, encoding) {
|
|
10
10
|
const promise = new Promise((resolve, reject) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Firebase, IFirebaseService } from '
|
|
1
|
+
import { Firebase, IFirebaseService } from '../interfaces/firebase';
|
|
2
2
|
declare class FirebaseService implements IFirebaseService {
|
|
3
3
|
publishConfig(req: Firebase.PublishConfig.Request): Promise<void>;
|
|
4
4
|
sendNotification(req: Firebase.SendNotification.Request): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GoogleDrive, IGoogleDriveService } from '
|
|
1
|
+
import { GoogleDrive, IGoogleDriveService } from '../../interfaces/gcp';
|
|
2
2
|
declare class GoogleDriveService implements IGoogleDriveService {
|
|
3
3
|
readFile(req: GoogleDrive.ReadFile.Request): Promise<GoogleDrive.ReadFile.Response>;
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import GoogleDriveService from '
|
|
2
|
-
import GoogleSecretsService from '
|
|
3
|
-
import GoogleSheetsService from '
|
|
1
|
+
import GoogleDriveService from '../../services/gcp/drive';
|
|
2
|
+
import GoogleSecretsService from '../../services/gcp/secrets';
|
|
3
|
+
import GoogleSheetsService from '../../services/gcp/sheets';
|
|
4
4
|
export { GoogleDriveService, GoogleSecretsService, GoogleSheetsService, };
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.GoogleSheetsService = exports.GoogleSecretsService = exports.GoogleDriveService = void 0;
|
|
7
|
-
const drive_1 = __importDefault(require("
|
|
7
|
+
const drive_1 = __importDefault(require("../../services/gcp/drive"));
|
|
8
8
|
exports.GoogleDriveService = drive_1.default;
|
|
9
|
-
const secrets_1 = __importDefault(require("
|
|
9
|
+
const secrets_1 = __importDefault(require("../../services/gcp/secrets"));
|
|
10
10
|
exports.GoogleSecretsService = secrets_1.default;
|
|
11
|
-
const sheets_1 = __importDefault(require("
|
|
11
|
+
const sheets_1 = __importDefault(require("../../services/gcp/sheets"));
|
|
12
12
|
exports.GoogleSheetsService = sheets_1.default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GoogleSecrets, IGoogleSecretsService } from '
|
|
1
|
+
import { GoogleSecrets, IGoogleSecretsService } from '../../interfaces/gcp';
|
|
2
2
|
declare class GoogleSecretsService implements IGoogleSecretsService {
|
|
3
3
|
getSecret<T>(req: GoogleSecrets.GetSecret.Request): Promise<GoogleSecrets.GetSecret.Response<T>>;
|
|
4
4
|
}
|
|
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const secret_manager_1 = require("@google-cloud/secret-manager");
|
|
16
|
-
const parse_secret_1 = __importDefault(require("
|
|
16
|
+
const parse_secret_1 = __importDefault(require("../../utils/parse-secret"));
|
|
17
17
|
class GoogleSecretsService {
|
|
18
18
|
getSecret(req) {
|
|
19
19
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GoogleSheets, IGoogleSheetsService } from '
|
|
1
|
+
import { GoogleSheets, IGoogleSheetsService } from '../../interfaces/gcp';
|
|
2
2
|
declare class GoogleSheetsService implements IGoogleSheetsService {
|
|
3
3
|
readSheet(req: GoogleSheets.ReadSheet.Request): Promise<GoogleSheets.ReadSheet.Response>;
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Grafana, IGrafanaService } from '
|
|
1
|
+
import { Grafana, IGrafanaService } from '../interfaces/grafana';
|
|
2
2
|
declare class GrafanaService implements IGrafanaService {
|
|
3
3
|
getDashboard(req: Grafana.GetDashboard.Request): Promise<Grafana.GetDashboard.Response>;
|
|
4
4
|
searchDashboard(req: Grafana.SearchDashboard.Request): Promise<Grafana.SearchDashboard.Response>;
|
package/dist/services/grafana.js
CHANGED
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const http_1 = __importDefault(require("
|
|
15
|
+
const http_1 = __importDefault(require("../services/http"));
|
|
16
16
|
class GrafanaService {
|
|
17
17
|
getDashboard(req) {
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
package/dist/services/http.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpRequest, HttpResponse, IHttpService } from '
|
|
1
|
+
import { HttpRequest, HttpResponse, IHttpService } from '../interfaces/http';
|
|
2
2
|
declare class HttpService implements IHttpService {
|
|
3
3
|
request<ResponseType>(req: HttpRequest): Promise<HttpResponse<ResponseType>>;
|
|
4
4
|
private wrapCall;
|
package/dist/services/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { AmazonCloudwatchService, AmazonPinpointService, AmazonS3Service, AmazonSecretManagerService } from '
|
|
2
|
-
import { AzureApplicationInsightsService, AzureCommunicationService, AzureKeyVaultService, AzureStorageBlobService } from '
|
|
3
|
-
import DateService from '
|
|
4
|
-
import FileService from '
|
|
5
|
-
import FirebaseService from '
|
|
6
|
-
import { GoogleDriveService, GoogleSecretsService, GoogleSheetsService } from '
|
|
7
|
-
import GrafanaService from '
|
|
8
|
-
import KeycloakService from '
|
|
9
|
-
import RabbitService from '
|
|
10
|
-
import RedisService from '
|
|
11
|
-
import SendgridService from '
|
|
1
|
+
import { AmazonCloudwatchService, AmazonPinpointService, AmazonS3Service, AmazonSecretManagerService } from '../services/aws';
|
|
2
|
+
import { AzureApplicationInsightsService, AzureCommunicationService, AzureKeyVaultService, AzureStorageBlobService } from '../services/azure';
|
|
3
|
+
import DateService from '../services/date';
|
|
4
|
+
import FileService from '../services/file';
|
|
5
|
+
import FirebaseService from '../services/firebase';
|
|
6
|
+
import { GoogleDriveService, GoogleSecretsService, GoogleSheetsService } from '../services/gcp';
|
|
7
|
+
import GrafanaService from '../services/grafana';
|
|
8
|
+
import KeycloakService from '../services/keycloak';
|
|
9
|
+
import RabbitService from '../services/rabbit';
|
|
10
|
+
import RedisService from '../services/redis';
|
|
11
|
+
import SendgridService from '../services/sendgrid';
|
|
12
12
|
export { AmazonCloudwatchService, AmazonPinpointService, AmazonS3Service, AmazonSecretManagerService, AzureApplicationInsightsService, AzureCommunicationService, AzureKeyVaultService, AzureStorageBlobService, DateService, FileService, FirebaseService, GoogleDriveService, GoogleSecretsService, GoogleSheetsService, GrafanaService, KeycloakService, RabbitService, RedisService, SendgridService, };
|
package/dist/services/index.js
CHANGED
|
@@ -4,33 +4,33 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SendgridService = exports.RedisService = exports.RabbitService = exports.KeycloakService = exports.GrafanaService = exports.GoogleSheetsService = exports.GoogleSecretsService = exports.GoogleDriveService = exports.FirebaseService = exports.FileService = exports.DateService = exports.AzureStorageBlobService = exports.AzureKeyVaultService = exports.AzureCommunicationService = exports.AzureApplicationInsightsService = exports.AmazonSecretManagerService = exports.AmazonS3Service = exports.AmazonPinpointService = exports.AmazonCloudwatchService = void 0;
|
|
7
|
-
const aws_1 = require("
|
|
7
|
+
const aws_1 = require("../services/aws");
|
|
8
8
|
Object.defineProperty(exports, "AmazonCloudwatchService", { enumerable: true, get: function () { return aws_1.AmazonCloudwatchService; } });
|
|
9
9
|
Object.defineProperty(exports, "AmazonPinpointService", { enumerable: true, get: function () { return aws_1.AmazonPinpointService; } });
|
|
10
10
|
Object.defineProperty(exports, "AmazonS3Service", { enumerable: true, get: function () { return aws_1.AmazonS3Service; } });
|
|
11
11
|
Object.defineProperty(exports, "AmazonSecretManagerService", { enumerable: true, get: function () { return aws_1.AmazonSecretManagerService; } });
|
|
12
|
-
const azure_1 = require("
|
|
12
|
+
const azure_1 = require("../services/azure");
|
|
13
13
|
Object.defineProperty(exports, "AzureApplicationInsightsService", { enumerable: true, get: function () { return azure_1.AzureApplicationInsightsService; } });
|
|
14
14
|
Object.defineProperty(exports, "AzureCommunicationService", { enumerable: true, get: function () { return azure_1.AzureCommunicationService; } });
|
|
15
15
|
Object.defineProperty(exports, "AzureKeyVaultService", { enumerable: true, get: function () { return azure_1.AzureKeyVaultService; } });
|
|
16
16
|
Object.defineProperty(exports, "AzureStorageBlobService", { enumerable: true, get: function () { return azure_1.AzureStorageBlobService; } });
|
|
17
|
-
const date_1 = __importDefault(require("
|
|
17
|
+
const date_1 = __importDefault(require("../services/date"));
|
|
18
18
|
exports.DateService = date_1.default;
|
|
19
|
-
const file_1 = __importDefault(require("
|
|
19
|
+
const file_1 = __importDefault(require("../services/file"));
|
|
20
20
|
exports.FileService = file_1.default;
|
|
21
|
-
const firebase_1 = __importDefault(require("
|
|
21
|
+
const firebase_1 = __importDefault(require("../services/firebase"));
|
|
22
22
|
exports.FirebaseService = firebase_1.default;
|
|
23
|
-
const gcp_1 = require("
|
|
23
|
+
const gcp_1 = require("../services/gcp");
|
|
24
24
|
Object.defineProperty(exports, "GoogleDriveService", { enumerable: true, get: function () { return gcp_1.GoogleDriveService; } });
|
|
25
25
|
Object.defineProperty(exports, "GoogleSecretsService", { enumerable: true, get: function () { return gcp_1.GoogleSecretsService; } });
|
|
26
26
|
Object.defineProperty(exports, "GoogleSheetsService", { enumerable: true, get: function () { return gcp_1.GoogleSheetsService; } });
|
|
27
|
-
const grafana_1 = __importDefault(require("
|
|
27
|
+
const grafana_1 = __importDefault(require("../services/grafana"));
|
|
28
28
|
exports.GrafanaService = grafana_1.default;
|
|
29
|
-
const keycloak_1 = __importDefault(require("
|
|
29
|
+
const keycloak_1 = __importDefault(require("../services/keycloak"));
|
|
30
30
|
exports.KeycloakService = keycloak_1.default;
|
|
31
|
-
const rabbit_1 = __importDefault(require("
|
|
31
|
+
const rabbit_1 = __importDefault(require("../services/rabbit"));
|
|
32
32
|
exports.RabbitService = rabbit_1.default;
|
|
33
|
-
const redis_1 = __importDefault(require("
|
|
33
|
+
const redis_1 = __importDefault(require("../services/redis"));
|
|
34
34
|
exports.RedisService = redis_1.default;
|
|
35
|
-
const sendgrid_1 = __importDefault(require("
|
|
35
|
+
const sendgrid_1 = __importDefault(require("../services/sendgrid"));
|
|
36
36
|
exports.SendgridService = sendgrid_1.default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IKeycloakService, Keycloak } from '
|
|
1
|
+
import { IKeycloakService, Keycloak } from '../interfaces/keycloak';
|
|
2
2
|
declare class KeycloakService implements IKeycloakService {
|
|
3
3
|
authenticate(req: Keycloak.Authenticate.Request): Promise<Keycloak.Authenticate.Response>;
|
|
4
4
|
refreshAccess(req: Keycloak.RefreshAccess.Request): Promise<Keycloak.RefreshAccess.Response>;
|
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const http_1 = __importDefault(require("
|
|
15
|
+
const http_1 = __importDefault(require("../services/http"));
|
|
16
16
|
class KeycloakService {
|
|
17
17
|
authenticate(req) {
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
package/dist/services/redis.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mblabs-roccato-backend-commons",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"axios": "^1.8.4",
|
|
52
52
|
"firebase-admin": "^13.4.0",
|
|
53
53
|
"googleapis": "^148.0.0",
|
|
54
|
-
"ts-custom-error": "^3.3.1",
|
|
55
54
|
"luxon": "^3.6.1",
|
|
56
55
|
"redis": "^5.0.1",
|
|
56
|
+
"reflect-metadata": "^0.2.2",
|
|
57
57
|
"typeorm": "^0.3.24"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
ObjectType,
|
|
7
7
|
} from 'typeorm';
|
|
8
8
|
|
|
9
|
-
import BaseEntity from '
|
|
10
|
-
import ProfileEntity from '
|
|
9
|
+
import BaseEntity from './base';
|
|
10
|
+
import ProfileEntity from './profile';
|
|
11
11
|
|
|
12
12
|
@Entity('account')
|
|
13
13
|
export default class AccountEntity extends BaseEntity {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner, Table, TableIndex } from 'typeorm';
|
|
2
2
|
|
|
3
|
-
import DatabaseUtils from '
|
|
3
|
+
import DatabaseUtils from '../utils';
|
|
4
4
|
|
|
5
5
|
export class CreateLeadsTable1748448590133 implements MigrationInterface {
|
|
6
6
|
public async up (queryRunner: QueryRunner): Promise<void> {
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Init1748448461165 } from './1748448461165-Init';
|
|
2
|
+
import { CreateProfilesTable1748448589743 } from './1748448589743-CreateProfilesTable';
|
|
3
|
+
import { CreateAccountsTable1748448589934 } from './1748448589934-CreateAccountsTable';
|
|
4
|
+
import { CreateLeadsTable1748448590133 } from './1748448590133-CreateLeadsTable';
|
|
5
|
+
import { CreateLeadResponsiblesTable1748448590361 } from './1748448590361-CreateLeadResponsiblesTable';
|
|
6
|
+
|
|
7
|
+
export const Migrations = [
|
|
8
|
+
Init1748448461165,
|
|
9
|
+
CreateProfilesTable1748448589743,
|
|
10
|
+
CreateAccountsTable1748448589934,
|
|
11
|
+
CreateLeadsTable1748448590133,
|
|
12
|
+
CreateLeadResponsiblesTable1748448590361,
|
|
13
|
+
];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CloudWatchLogs } from '@aws-sdk/client-cloudwatch-logs';
|
|
2
2
|
|
|
3
|
-
import { AmazonCloudwatch, IAmazonCloudwatchService } from '
|
|
3
|
+
import { AmazonCloudwatch, IAmazonCloudwatchService } from '../../interfaces/aws';
|
|
4
4
|
|
|
5
5
|
class AmazonCloudwatchService implements IAmazonCloudwatchService {
|
|
6
6
|
public async createLogEvent (req: AmazonCloudwatch.CreateLogEvent.Request): Promise<void> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import AmazonCloudwatchService from '
|
|
2
|
-
import AmazonPinpointService from '
|
|
3
|
-
import AmazonS3Service from '
|
|
4
|
-
import AmazonSecretManagerService from '
|
|
1
|
+
import AmazonCloudwatchService from '../../services/aws/cloudwatch';
|
|
2
|
+
import AmazonPinpointService from '../../services/aws/pinpoint';
|
|
3
|
+
import AmazonS3Service from '../../services/aws/s3';
|
|
4
|
+
import AmazonSecretManagerService from '../../services/aws/secret-manager';
|
|
5
5
|
|
|
6
6
|
export {
|
|
7
7
|
AmazonCloudwatchService,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PinpointClient, SendMessagesCommand, SendMessagesCommandInput } from '@aws-sdk/client-pinpoint';
|
|
2
2
|
|
|
3
|
-
import { AmazonPinpoint, IAmazonPinpointService } from '
|
|
3
|
+
import { AmazonPinpoint, IAmazonPinpointService } from '../../interfaces/aws';
|
|
4
4
|
|
|
5
5
|
class AmazonPinpointService implements IAmazonPinpointService {
|
|
6
6
|
async sendMail (req: AmazonPinpoint.SendMail.Request): Promise<void> {
|
package/src/services/aws/s3.ts
CHANGED
|
@@ -7,9 +7,8 @@ import {
|
|
|
7
7
|
} from '@aws-sdk/client-s3';
|
|
8
8
|
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';
|
|
9
9
|
|
|
10
|
-
import { AmazonS3, IAmazonS3Service } from '
|
|
11
|
-
|
|
12
|
-
import FileService from '@services/file';
|
|
10
|
+
import { AmazonS3, IAmazonS3Service } from '../../interfaces/aws';
|
|
11
|
+
import FileService from '../../services/file';
|
|
13
12
|
|
|
14
13
|
class AmazonS3Service implements IAmazonS3Service {
|
|
15
14
|
async uploadBase64 (req: AmazonS3.UploadBase64.Request): Promise<AmazonS3.UploadBase64.Response> {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { SecretsManager } from '@aws-sdk/client-secrets-manager';
|
|
2
2
|
|
|
3
|
-
import { AmazonSecretManager, IAmazonSecretManagerService } from '
|
|
4
|
-
|
|
5
|
-
import SecretParser from '@utils/parse-secret';
|
|
3
|
+
import { AmazonSecretManager, IAmazonSecretManagerService } from '../../interfaces/aws';
|
|
4
|
+
import SecretParser from '../../utils/parse-secret';
|
|
6
5
|
|
|
7
6
|
class AmazonSecretManagerService implements IAmazonSecretManagerService {
|
|
8
7
|
public async getSecret<T> (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as ApplicationInsights from 'applicationinsights';
|
|
2
2
|
|
|
3
|
-
import { AzureApplicationInsights, IAzureApplicationInsightsService } from '
|
|
3
|
+
import { AzureApplicationInsights, IAzureApplicationInsightsService } from '../../interfaces/azure';
|
|
4
4
|
|
|
5
5
|
class AzureApplicationInsightsService implements IAzureApplicationInsightsService {
|
|
6
6
|
async trackTrace (req: AzureApplicationInsights.TrackTrace.Request) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EmailClient, EmailMessage } from '@azure/communication-email';
|
|
2
2
|
import { SmsClient, SmsSendRequest } from '@azure/communication-sms';
|
|
3
3
|
|
|
4
|
-
import { AzureCommunication, IAzureCommunicationService } from '
|
|
4
|
+
import { AzureCommunication, IAzureCommunicationService } from '../../interfaces/azure';
|
|
5
5
|
|
|
6
6
|
class AzureCommunicationService implements IAzureCommunicationService {
|
|
7
7
|
async sendMail (req: AzureCommunication.SendMail.Request): Promise<void> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import AzureApplicationInsightsService from '
|
|
2
|
-
import AzureCommunicationService from '
|
|
3
|
-
import AzureKeyVaultService from '
|
|
4
|
-
import AzureStorageBlobService from '
|
|
1
|
+
import AzureApplicationInsightsService from '../../services/azure/application-insights';
|
|
2
|
+
import AzureCommunicationService from '../../services/azure/communication';
|
|
3
|
+
import AzureKeyVaultService from '../../services/azure/keyvault';
|
|
4
|
+
import AzureStorageBlobService from '../../services/azure/storage-blob';
|
|
5
5
|
|
|
6
6
|
export {
|
|
7
7
|
AzureApplicationInsightsService,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { DefaultAzureCredential } from '@azure/identity';
|
|
2
2
|
import { SecretClient } from '@azure/keyvault-secrets';
|
|
3
3
|
|
|
4
|
-
import { AzureKeyVault, IAzureKeyVaultService } from '
|
|
5
|
-
|
|
6
|
-
import SecretParser from '@utils/parse-secret';
|
|
4
|
+
import { AzureKeyVault, IAzureKeyVaultService } from '../../interfaces/azure';
|
|
5
|
+
import SecretParser from '../../utils/parse-secret';
|
|
7
6
|
|
|
8
7
|
class AzureKeyVaultService implements IAzureKeyVaultService {
|
|
9
8
|
async getSecret<T> (req: AzureKeyVault.GetSecret.Request): Promise<AzureKeyVault.GetSecret.Response<T>> {
|
|
@@ -6,10 +6,9 @@ import {
|
|
|
6
6
|
StorageSharedKeyCredential,
|
|
7
7
|
} from '@azure/storage-blob';
|
|
8
8
|
|
|
9
|
-
import { AzureStorageBlob, IAzureStorageBlobService } from '
|
|
10
|
-
|
|
11
|
-
import
|
|
12
|
-
import FileService from '@services/file';
|
|
9
|
+
import { AzureStorageBlob, IAzureStorageBlobService } from '../../interfaces/azure';
|
|
10
|
+
import DateService from '../../services/date';
|
|
11
|
+
import FileService from '../../services/file';
|
|
13
12
|
|
|
14
13
|
class AzureStorageBlobService implements IAzureStorageBlobService {
|
|
15
14
|
|
package/src/services/file.ts
CHANGED
package/src/services/firebase.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import FirebaseAdmin from 'firebase-admin';
|
|
2
2
|
|
|
3
|
-
import { Firebase, IFirebaseService } from '
|
|
3
|
+
import { Firebase, IFirebaseService } from '../interfaces/firebase';
|
|
4
4
|
|
|
5
5
|
class FirebaseService implements IFirebaseService {
|
|
6
6
|
async publishConfig (req: Firebase.PublishConfig.Request): Promise<void> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { google } from 'googleapis';
|
|
2
2
|
|
|
3
|
-
import { GoogleDrive, IGoogleDriveService } from '
|
|
3
|
+
import { GoogleDrive, IGoogleDriveService } from '../../interfaces/gcp';
|
|
4
4
|
|
|
5
5
|
class GoogleDriveService implements IGoogleDriveService {
|
|
6
6
|
public async readFile (req: GoogleDrive.ReadFile.Request): Promise<GoogleDrive.ReadFile.Response> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import GoogleDriveService from '
|
|
2
|
-
import GoogleSecretsService from '
|
|
3
|
-
import GoogleSheetsService from '
|
|
1
|
+
import GoogleDriveService from '../../services/gcp/drive';
|
|
2
|
+
import GoogleSecretsService from '../../services/gcp/secrets';
|
|
3
|
+
import GoogleSheetsService from '../../services/gcp/sheets';
|
|
4
4
|
|
|
5
5
|
export {
|
|
6
6
|
GoogleDriveService,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { SecretManagerServiceClient } from '@google-cloud/secret-manager';
|
|
2
2
|
|
|
3
|
-
import { GoogleSecrets, IGoogleSecretsService } from '
|
|
4
|
-
|
|
5
|
-
import SecretParser from '@utils/parse-secret';
|
|
3
|
+
import { GoogleSecrets, IGoogleSecretsService } from '../../interfaces/gcp';
|
|
4
|
+
import SecretParser from '../../utils/parse-secret';
|
|
6
5
|
|
|
7
6
|
class GoogleSecretsService implements IGoogleSecretsService {
|
|
8
7
|
public async getSecret<T> (req: GoogleSecrets.GetSecret.Request): Promise<GoogleSecrets.GetSecret.Response<T>> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { google } from 'googleapis';
|
|
2
2
|
|
|
3
|
-
import { GoogleSheets, IGoogleSheetsService } from '
|
|
3
|
+
import { GoogleSheets, IGoogleSheetsService } from '../../interfaces/gcp';
|
|
4
4
|
|
|
5
5
|
class GoogleSheetsService implements IGoogleSheetsService {
|
|
6
6
|
public async readSheet (req: GoogleSheets.ReadSheet.Request): Promise<GoogleSheets.ReadSheet.Response> {
|
package/src/services/grafana.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Grafana, IGrafanaService } from '
|
|
2
|
-
|
|
3
|
-
import HttpService from '@services/http';
|
|
1
|
+
import { Grafana, IGrafanaService } from '../interfaces/grafana';
|
|
2
|
+
import HttpService from '../services/http';
|
|
4
3
|
|
|
5
4
|
class GrafanaService implements IGrafanaService {
|
|
6
5
|
async getDashboard (req: Grafana.GetDashboard.Request): Promise<Grafana.GetDashboard.Response> {
|
package/src/services/http.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import axios, { AxiosError, AxiosInstance, AxiosResponse } from 'axios';
|
|
2
2
|
|
|
3
|
-
import { HttpError, HttpRequest, HttpResponse, IHttpService } from '
|
|
3
|
+
import { HttpError, HttpRequest, HttpResponse, IHttpService } from '../interfaces/http';
|
|
4
4
|
|
|
5
5
|
class HttpService implements IHttpService {
|
|
6
6
|
async request <ResponseType> (req: HttpRequest): Promise<HttpResponse<ResponseType>> {
|
package/src/services/index.ts
CHANGED
|
@@ -3,25 +3,25 @@ import {
|
|
|
3
3
|
AmazonPinpointService,
|
|
4
4
|
AmazonS3Service,
|
|
5
5
|
AmazonSecretManagerService,
|
|
6
|
-
} from '
|
|
6
|
+
} from '../services/aws';
|
|
7
7
|
import {
|
|
8
8
|
AzureApplicationInsightsService,
|
|
9
9
|
AzureCommunicationService,
|
|
10
10
|
AzureKeyVaultService,
|
|
11
11
|
AzureStorageBlobService,
|
|
12
|
-
} from '
|
|
13
|
-
import DateService from '
|
|
14
|
-
import FileService from '
|
|
15
|
-
import FirebaseService from '
|
|
12
|
+
} from '../services/azure';
|
|
13
|
+
import DateService from '../services/date';
|
|
14
|
+
import FileService from '../services/file';
|
|
15
|
+
import FirebaseService from '../services/firebase';
|
|
16
16
|
import { GoogleDriveService,
|
|
17
17
|
GoogleSecretsService,
|
|
18
18
|
GoogleSheetsService,
|
|
19
|
-
} from '
|
|
20
|
-
import GrafanaService from '
|
|
21
|
-
import KeycloakService from '
|
|
22
|
-
import RabbitService from '
|
|
23
|
-
import RedisService from '
|
|
24
|
-
import SendgridService from '
|
|
19
|
+
} from '../services/gcp';
|
|
20
|
+
import GrafanaService from '../services/grafana';
|
|
21
|
+
import KeycloakService from '../services/keycloak';
|
|
22
|
+
import RabbitService from '../services/rabbit';
|
|
23
|
+
import RedisService from '../services/redis';
|
|
24
|
+
import SendgridService from '../services/sendgrid';
|
|
25
25
|
|
|
26
26
|
export {
|
|
27
27
|
AmazonCloudwatchService,
|
package/src/services/keycloak.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IKeycloakService, Keycloak } from '
|
|
2
|
-
|
|
3
|
-
import HttpService from '@services/http';
|
|
1
|
+
import { IKeycloakService, Keycloak } from '../interfaces/keycloak';
|
|
2
|
+
import HttpService from '../services/http';
|
|
4
3
|
|
|
5
4
|
class KeycloakService implements IKeycloakService {
|
|
6
5
|
async authenticate (req: Keycloak.Authenticate.Request): Promise<Keycloak.Authenticate.Response> {
|
package/src/services/rabbit.ts
CHANGED
package/src/services/redis.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createClient, RedisClientType } from 'redis';
|
|
2
2
|
|
|
3
|
-
import { IRedisService } from '
|
|
4
|
-
import { Redis } from '@interfaces/redis';
|
|
3
|
+
import { IRedisService, Redis } from '../interfaces/redis';
|
|
5
4
|
|
|
6
5
|
class RedisService implements IRedisService {
|
|
7
6
|
private client: RedisClientType;
|
package/src/services/sendgrid.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import instance from '@sendgrid/mail';
|
|
2
2
|
|
|
3
|
-
import { ISendgridService, Sendgrid } from '
|
|
3
|
+
import { ISendgridService, Sendgrid } from '../interfaces/sendgrid';
|
|
4
4
|
|
|
5
5
|
class SendgridService implements ISendgridService {
|
|
6
6
|
async sendMail (req: Sendgrid.SendMail.Request): Promise<void> {
|