mblabs-roccato-backend-commons 1.0.8 → 1.1.0
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/bitbucket-pipelines.yml +6 -48
- package/dist/database/entities/account.d.ts +1 -2
- package/dist/database/entities/account.js +2 -7
- package/dist/database/entities/address.d.ts +2 -1
- package/dist/database/entities/address.js +6 -5
- package/dist/database/entities/company-address.d.ts +10 -0
- package/dist/database/entities/company-address.js +51 -0
- package/dist/database/entities/company.d.ts +13 -0
- package/dist/database/entities/company.js +68 -0
- package/dist/database/entities/index.d.ts +3 -1
- package/dist/database/entities/index.js +5 -1
- package/dist/database/migrations/1748448589934-CreateAccountsTable.js +1 -6
- package/dist/database/migrations/1750432386920-CreateAddressTable.js +0 -5
- package/dist/database/migrations/{1750691840822-CreateAccountDetailsTable.d.ts → 1750437883213-CreateCompanyTable.d.ts} +1 -1
- package/dist/database/migrations/{1750691840822-CreateAccountDetailsTable.js → 1750437883213-CreateCompanyTable.js} +35 -23
- package/dist/database/migrations/{1750690818577-CreateAccountAddressTable.d.ts → 1750440116105-CreateCompanyAddressTable.d.ts} +1 -1
- package/dist/database/migrations/{1750690818577-CreateAccountAddressTable.js → 1750440116105-CreateCompanyAddressTable.js} +14 -21
- package/dist/database/migrations/index.d.ts +1 -29
- package/dist/database/migrations/index.js +18 -18
- package/dist/interfaces/aws.d.ts +41 -67
- package/dist/interfaces/azure.d.ts +38 -61
- package/dist/interfaces/firebase.d.ts +3 -7
- package/dist/interfaces/gcp.d.ts +5 -11
- package/dist/interfaces/grafana.d.ts +2 -6
- package/dist/interfaces/keycloak.d.ts +4 -171
- package/dist/interfaces/nodemailer.d.ts +16 -20
- package/dist/interfaces/redis.d.ts +8 -49
- package/dist/interfaces/sendgrid.d.ts +13 -15
- package/dist/services/aws/cloudwatch.d.ts +1 -1
- package/dist/services/aws/cloudwatch.js +38 -38
- package/dist/services/aws/pinpoint.d.ts +3 -3
- package/dist/services/aws/pinpoint.js +29 -29
- package/dist/services/aws/s3.d.ts +5 -5
- package/dist/services/aws/s3.js +55 -59
- package/dist/services/aws/secret-manager.d.ts +1 -1
- package/dist/services/aws/secret-manager.js +5 -5
- package/dist/services/aws/sqs.d.ts +3 -3
- package/dist/services/aws/sqs.js +16 -16
- package/dist/services/azure/application-insights.d.ts +4 -4
- package/dist/services/azure/application-insights.js +12 -12
- package/dist/services/azure/communication.d.ts +3 -3
- package/dist/services/azure/communication.js +17 -17
- package/dist/services/azure/keyvault.d.ts +1 -1
- package/dist/services/azure/keyvault.js +3 -3
- package/dist/services/azure/storage-blob.d.ts +3 -3
- package/dist/services/azure/storage-blob.js +22 -22
- package/dist/services/firebase.d.ts +2 -2
- package/dist/services/firebase.js +10 -12
- package/dist/services/gcp/drive.d.ts +1 -1
- package/dist/services/gcp/drive.js +4 -4
- package/dist/services/gcp/secrets.d.ts +1 -1
- package/dist/services/gcp/secrets.js +8 -6
- package/dist/services/gcp/sheets.d.ts +1 -1
- package/dist/services/gcp/sheets.js +6 -6
- package/dist/services/grafana.d.ts +2 -2
- package/dist/services/grafana.js +12 -12
- package/dist/services/keycloak.d.ts +2 -14
- package/dist/services/keycloak.js +24 -300
- package/dist/services/nodemailer.d.ts +2 -2
- package/dist/services/nodemailer.js +109 -19
- package/dist/services/redis.d.ts +8 -6
- package/dist/services/redis.js +24 -53
- package/dist/services/sendgrid.d.ts +1 -1
- package/dist/services/sendgrid.js +10 -10
- package/package.json +1 -1
- package/src/database/entities/account.ts +3 -5
- package/src/database/entities/address.ts +7 -4
- package/src/database/entities/company-address.ts +27 -0
- package/src/database/entities/company.ts +36 -0
- package/src/database/entities/index.ts +4 -0
- package/src/database/migrations/1748448589934-CreateAccountsTable.ts +1 -6
- package/src/database/migrations/1750432386920-CreateAddressTable.ts +0 -5
- package/src/database/migrations/{1750691840822-CreateAccountDetailsTable.ts → 1750437883213-CreateCompanyTable.ts} +35 -21
- package/src/database/migrations/{1750690818577-CreateAccountAddressTable.ts → 1750440116105-CreateCompanyAddressTable.ts} +14 -24
- package/src/database/migrations/index.ts +6 -6
- package/src/interfaces/aws.ts +55 -81
- package/src/interfaces/azure.ts +50 -71
- package/src/interfaces/firebase.ts +6 -10
- package/src/interfaces/gcp.ts +8 -14
- package/src/interfaces/grafana.ts +5 -9
- package/src/interfaces/keycloak.ts +7 -190
- package/src/interfaces/nodemailer.ts +18 -22
- package/src/interfaces/redis.ts +8 -54
- package/src/interfaces/sendgrid.ts +14 -16
- package/src/services/aws/cloudwatch.ts +39 -39
- package/src/services/aws/pinpoint.ts +30 -30
- package/src/services/aws/s3.ts +55 -59
- package/src/services/aws/secret-manager.ts +7 -8
- package/src/services/aws/sqs.ts +17 -23
- package/src/services/azure/application-insights.ts +12 -12
- package/src/services/azure/communication.ts +18 -18
- package/src/services/azure/keyvault.ts +3 -3
- package/src/services/azure/storage-blob.ts +30 -34
- package/src/services/firebase.ts +11 -21
- package/src/services/gcp/drive.ts +5 -8
- package/src/services/gcp/secrets.ts +10 -9
- package/src/services/gcp/sheets.ts +7 -10
- package/src/services/grafana.ts +12 -18
- package/src/services/keycloak.ts +25 -381
- package/src/services/nodemailer.ts +110 -19
- package/src/services/redis.ts +22 -58
- package/src/services/sendgrid.ts +11 -11
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Column,
|
|
3
3
|
Entity,
|
|
4
|
+
OneToMany,
|
|
4
5
|
} from 'typeorm';
|
|
5
6
|
|
|
6
7
|
import BaseEntity from './base';
|
|
8
|
+
import CompanyAddressEntity from './company-address';
|
|
7
9
|
|
|
8
10
|
@Entity('address')
|
|
9
11
|
export default class AddressEntity extends BaseEntity {
|
|
12
|
+
|
|
10
13
|
@Column({ type: 'varchar', nullable: true })
|
|
11
14
|
public zipcode?: string;
|
|
12
15
|
|
|
@@ -22,14 +25,14 @@ export default class AddressEntity extends BaseEntity {
|
|
|
22
25
|
@Column({ type: 'varchar', nullable: true })
|
|
23
26
|
public city?: string;
|
|
24
27
|
|
|
25
|
-
@Column({ type: 'varchar', nullable: true })
|
|
26
|
-
public neighborhood?: string;
|
|
27
|
-
|
|
28
28
|
@Column({ type: 'varchar', nullable: true })
|
|
29
29
|
public state?: string;
|
|
30
30
|
|
|
31
|
+
@OneToMany(() => CompanyAddressEntity, (companyAddress) => companyAddress.address)
|
|
32
|
+
public companyAddresses?: CompanyAddressEntity[];
|
|
33
|
+
|
|
31
34
|
constructor (partial: Partial<AddressEntity>) {
|
|
32
35
|
super();
|
|
33
36
|
Object.assign(this, partial);
|
|
34
37
|
}
|
|
35
|
-
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Column, Entity, JoinColumn, ManyToOne } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
import AddressEntity from './address';
|
|
4
|
+
import BaseEntity from './base';
|
|
5
|
+
import CompanyEntity from './company';
|
|
6
|
+
|
|
7
|
+
@Entity({ name: 'company_address' })
|
|
8
|
+
export default class CompanyAddressEntity extends BaseEntity {
|
|
9
|
+
@Column({ type: 'uuid', nullable: true })
|
|
10
|
+
public companyId?: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'uuid', nullable: true })
|
|
13
|
+
public addressId?: string;
|
|
14
|
+
|
|
15
|
+
@ManyToOne(() => CompanyEntity, (company) => company.companyAddresses)
|
|
16
|
+
@JoinColumn({ name: 'companyId' })
|
|
17
|
+
public company?: CompanyEntity;
|
|
18
|
+
|
|
19
|
+
@ManyToOne(() => AddressEntity, (address) => address.companyAddresses)
|
|
20
|
+
@JoinColumn({ name: 'addressId' })
|
|
21
|
+
public address?: AddressEntity;
|
|
22
|
+
|
|
23
|
+
constructor (partial: Partial<CompanyAddressEntity>) {
|
|
24
|
+
super();
|
|
25
|
+
Object.assign(this, partial);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Column, Entity, OneToMany } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
import BaseEntity from './base';
|
|
4
|
+
import CompanyAddressEntity from './company-address';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'company' })
|
|
7
|
+
export default class CompanyEntity extends BaseEntity {
|
|
8
|
+
@Column({ type: 'varchar', nullable: true })
|
|
9
|
+
public corporateName?: string;
|
|
10
|
+
|
|
11
|
+
@Column({ type: 'varchar', nullable: true })
|
|
12
|
+
public fantasyName?: string;
|
|
13
|
+
|
|
14
|
+
@Column({ type: 'varchar', nullable: true })
|
|
15
|
+
public businessDocument?: string;
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'varchar', nullable: true })
|
|
18
|
+
public primaryCNAE?: string;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'varchar', array: true, nullable: true })
|
|
21
|
+
public secondaryCNAE?: string[];
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'varchar', nullable: true })
|
|
24
|
+
public stateRegistration?: string;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'boolean', nullable: true })
|
|
27
|
+
public exempt?: boolean;
|
|
28
|
+
|
|
29
|
+
@OneToMany(() => CompanyAddressEntity, (companyAddress) => companyAddress.company)
|
|
30
|
+
public companyAddresses?: CompanyAddressEntity[];
|
|
31
|
+
|
|
32
|
+
constructor (partial: Partial<CompanyEntity>) {
|
|
33
|
+
super();
|
|
34
|
+
Object.assign(this, partial);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -2,6 +2,8 @@ import AccountEntity from './account';
|
|
|
2
2
|
import AccountGroupEntity from './account-group';
|
|
3
3
|
import AccountModuleEntity from './account-module';
|
|
4
4
|
import AddressEntity from './address';
|
|
5
|
+
import CompanyEntity from './company';
|
|
6
|
+
import CompanyAddressEntity from './company-address';
|
|
5
7
|
import GroupEntity from './group';
|
|
6
8
|
import GroupModuleEntity from './group-module';
|
|
7
9
|
import ModuleEntity from './module';
|
|
@@ -16,4 +18,6 @@ export {
|
|
|
16
18
|
ModuleEntity,
|
|
17
19
|
ProfileEntity,
|
|
18
20
|
AddressEntity,
|
|
21
|
+
CompanyAddressEntity,
|
|
22
|
+
CompanyEntity,
|
|
19
23
|
};
|
|
@@ -36,12 +36,7 @@ export class CreateAccountsTable1748448589934 implements MigrationInterface {
|
|
|
36
36
|
isNullable: true,
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
name: '
|
|
40
|
-
type: 'varchar',
|
|
41
|
-
isNullable: true,
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
name: 'businessDocument',
|
|
39
|
+
name: 'cellphone',
|
|
45
40
|
type: 'varchar',
|
|
46
41
|
isNullable: true,
|
|
47
42
|
},
|
|
@@ -2,15 +2,16 @@ import { MigrationInterface, QueryRunner, Table, TableIndex } from 'typeorm';
|
|
|
2
2
|
|
|
3
3
|
import DatabaseUtils from '../utils';
|
|
4
4
|
|
|
5
|
-
export class
|
|
5
|
+
export class CreateCompanyTable1750437883213 implements MigrationInterface {
|
|
6
|
+
|
|
6
7
|
public async up (queryRunner: QueryRunner): Promise<void> {
|
|
7
|
-
const hasTable = await DatabaseUtils.checkHasTable('
|
|
8
|
+
const hasTable = await DatabaseUtils.checkHasTable('company', queryRunner);
|
|
8
9
|
|
|
9
10
|
if (hasTable) return;
|
|
10
11
|
|
|
11
12
|
await queryRunner.createTable(
|
|
12
13
|
new Table({
|
|
13
|
-
name: '
|
|
14
|
+
name: 'company',
|
|
14
15
|
columns: [
|
|
15
16
|
{
|
|
16
17
|
name: 'id',
|
|
@@ -20,25 +21,41 @@ export class CreateAccountDetailsTable1750691840822 implements MigrationInterfac
|
|
|
20
21
|
default: 'uuid_generate_v4()',
|
|
21
22
|
},
|
|
22
23
|
{
|
|
23
|
-
name: '
|
|
24
|
-
type: '
|
|
24
|
+
name: 'corporateName',
|
|
25
|
+
type: 'varchar',
|
|
26
|
+
isNullable: true,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'fantasyName',
|
|
30
|
+
type: 'varchar',
|
|
31
|
+
isNullable: true,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'businessDocument',
|
|
35
|
+
type: 'varchar',
|
|
25
36
|
isNullable: true,
|
|
26
37
|
},
|
|
27
38
|
{
|
|
28
|
-
name: '
|
|
39
|
+
name: 'primaryCNAE',
|
|
29
40
|
type: 'varchar',
|
|
30
41
|
isNullable: true,
|
|
31
42
|
},
|
|
32
43
|
{
|
|
33
|
-
name: '
|
|
44
|
+
name: 'secondaryCNAE',
|
|
34
45
|
type: 'varchar',
|
|
46
|
+
isArray: true,
|
|
35
47
|
isNullable: true,
|
|
36
48
|
},
|
|
37
49
|
{
|
|
38
|
-
name: '
|
|
50
|
+
name: 'stateRegistration',
|
|
39
51
|
type: 'varchar',
|
|
40
52
|
isNullable: true,
|
|
41
53
|
},
|
|
54
|
+
{
|
|
55
|
+
name: 'exempt',
|
|
56
|
+
type: 'boolean',
|
|
57
|
+
isNullable: true,
|
|
58
|
+
},
|
|
42
59
|
{
|
|
43
60
|
name: 'createdBy',
|
|
44
61
|
type: 'varchar',
|
|
@@ -70,17 +87,14 @@ export class CreateAccountDetailsTable1750691840822 implements MigrationInterfac
|
|
|
70
87
|
isNullable: true,
|
|
71
88
|
},
|
|
72
89
|
],
|
|
73
|
-
foreignKeys: [
|
|
74
|
-
{
|
|
75
|
-
columnNames: [ 'accountId' ],
|
|
76
|
-
referencedTableName: 'account',
|
|
77
|
-
referencedColumnNames: [ 'id' ],
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
90
|
indices: [
|
|
81
91
|
new TableIndex({
|
|
82
|
-
name: '
|
|
83
|
-
columnNames: [
|
|
92
|
+
name: 'IDX_COMPANY',
|
|
93
|
+
columnNames: [
|
|
94
|
+
'id',
|
|
95
|
+
'businessDocument',
|
|
96
|
+
'stateRegistration',
|
|
97
|
+
],
|
|
84
98
|
}),
|
|
85
99
|
],
|
|
86
100
|
})
|
|
@@ -88,12 +102,12 @@ export class CreateAccountDetailsTable1750691840822 implements MigrationInterfac
|
|
|
88
102
|
}
|
|
89
103
|
|
|
90
104
|
public async down (queryRunner: QueryRunner): Promise<void> {
|
|
91
|
-
const hasTable = await DatabaseUtils.checkHasTable('
|
|
105
|
+
const hasTable = await DatabaseUtils.checkHasTable('company', queryRunner);
|
|
92
106
|
|
|
93
107
|
if (!hasTable) return;
|
|
94
108
|
|
|
95
|
-
await DatabaseUtils.
|
|
96
|
-
await
|
|
97
|
-
await queryRunner.dropTable('account_details');
|
|
109
|
+
await DatabaseUtils.dropIndex('address', 'IDX_COMPANY', queryRunner);
|
|
110
|
+
await queryRunner.dropTable('company');
|
|
98
111
|
}
|
|
112
|
+
|
|
99
113
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { MigrationInterface, QueryRunner, Table
|
|
1
|
+
import { MigrationInterface, QueryRunner, Table } from 'typeorm';
|
|
2
2
|
|
|
3
3
|
import DatabaseUtils from '../utils';
|
|
4
4
|
|
|
5
|
-
export class
|
|
5
|
+
export class CreateCompanyAddressTable1750440116105 implements MigrationInterface {
|
|
6
6
|
public async up (queryRunner: QueryRunner): Promise<void> {
|
|
7
|
-
const hasTable = await DatabaseUtils.checkHasTable('
|
|
7
|
+
const hasTable = await DatabaseUtils.checkHasTable('company_address', queryRunner);
|
|
8
8
|
|
|
9
9
|
if (hasTable) return;
|
|
10
10
|
|
|
11
11
|
await queryRunner.createTable(
|
|
12
12
|
new Table({
|
|
13
|
-
name: '
|
|
13
|
+
name: 'company_address',
|
|
14
14
|
columns: [
|
|
15
15
|
{
|
|
16
16
|
name: 'id',
|
|
@@ -20,14 +20,14 @@ export class CreateAccountAddressTable1750690818577 implements MigrationInterfac
|
|
|
20
20
|
default: 'uuid_generate_v4()',
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
name: '
|
|
23
|
+
name: 'companyId',
|
|
24
24
|
type: 'uuid',
|
|
25
|
-
isNullable:
|
|
25
|
+
isNullable: true,
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
name: 'addressId',
|
|
29
29
|
type: 'uuid',
|
|
30
|
-
isNullable:
|
|
30
|
+
isNullable: true,
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
name: 'createdBy',
|
|
@@ -62,37 +62,27 @@ export class CreateAccountAddressTable1750690818577 implements MigrationInterfac
|
|
|
62
62
|
],
|
|
63
63
|
foreignKeys: [
|
|
64
64
|
{
|
|
65
|
-
columnNames: [ '
|
|
65
|
+
columnNames: [ 'companyId' ],
|
|
66
|
+
referencedTableName: 'company',
|
|
66
67
|
referencedColumnNames: [ 'id' ],
|
|
67
|
-
referencedTableName: 'account',
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
columnNames: [ 'addressId' ],
|
|
71
|
-
referencedColumnNames: [ 'id' ],
|
|
72
71
|
referencedTableName: 'address',
|
|
72
|
+
referencedColumnNames: [ 'id' ],
|
|
73
73
|
},
|
|
74
74
|
],
|
|
75
|
-
indices: [
|
|
76
|
-
new TableIndex({
|
|
77
|
-
name: 'IDX_ACCOUNT_ADDRESS',
|
|
78
|
-
columnNames: [ 'id', 'accountId', 'addressId' ],
|
|
79
|
-
}),
|
|
80
|
-
],
|
|
81
75
|
})
|
|
82
76
|
);
|
|
83
77
|
}
|
|
84
78
|
|
|
85
79
|
public async down (queryRunner: QueryRunner): Promise<void> {
|
|
86
|
-
const hasTable = await DatabaseUtils.checkHasTable('
|
|
80
|
+
const hasTable = await DatabaseUtils.checkHasTable('company_address', queryRunner);
|
|
87
81
|
|
|
88
82
|
if (!hasTable) return;
|
|
89
83
|
|
|
90
|
-
await DatabaseUtils.dropTableForeignKeys(
|
|
91
|
-
|
|
92
|
-
[ 'accountId', 'addressId' ],
|
|
93
|
-
queryRunner
|
|
94
|
-
);
|
|
95
|
-
await DatabaseUtils.dropIndex('account_address', 'IDX_ACCOUNT_ADDRESS', queryRunner);
|
|
96
|
-
await queryRunner.dropTable('account_address');
|
|
84
|
+
await DatabaseUtils.dropTableForeignKeys('company_address', [ 'companyId', 'addressId' ], queryRunner);
|
|
85
|
+
await queryRunner.dropTable('company_address');
|
|
97
86
|
}
|
|
87
|
+
|
|
98
88
|
}
|
|
@@ -10,10 +10,10 @@ import { CreateAccountModuleTable1748449000300 } from './1749142343254-CreateAcc
|
|
|
10
10
|
import { CreateCredentialsTable1749477835922 } from './1749477835922-CreateCredentialsTable';
|
|
11
11
|
import { CreateAccountContactTable1750432386914 } from './1750432386914-CreateAccountContactTable';
|
|
12
12
|
import { CreateAddressTable1750432386920 } from './1750432386920-CreateAddressTable';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { CreateCompanyTable1750437883213 } from './1750437883213-CreateCompanyTable';
|
|
14
|
+
import { CreateCompanyAddressTable1750440116105 } from './1750440116105-CreateCompanyAddressTable';
|
|
15
15
|
|
|
16
|
-
export const Migrations =
|
|
16
|
+
export const Migrations = [
|
|
17
17
|
Init1748448461165,
|
|
18
18
|
CreateProfilesTable1748448589743,
|
|
19
19
|
CreateAccountsTable1748448589934,
|
|
@@ -26,6 +26,6 @@ export const Migrations = {
|
|
|
26
26
|
CreateCredentialsTable1749477835922,
|
|
27
27
|
CreateAccountContactTable1750432386914,
|
|
28
28
|
CreateAddressTable1750432386920,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
CreateCompanyTable1750437883213,
|
|
30
|
+
CreateCompanyAddressTable1750440116105,
|
|
31
|
+
];
|
package/src/interfaces/aws.ts
CHANGED
|
@@ -19,12 +19,10 @@ interface UploadOptions {
|
|
|
19
19
|
export namespace AmazonCloudwatch {
|
|
20
20
|
export namespace CreateLogEvent {
|
|
21
21
|
export interface Request {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
events: InputLogEvent[];
|
|
27
|
-
};
|
|
22
|
+
application: string;
|
|
23
|
+
group: string;
|
|
24
|
+
stream: string;
|
|
25
|
+
events: InputLogEvent[];
|
|
28
26
|
credentials: Credentials;
|
|
29
27
|
}
|
|
30
28
|
}
|
|
@@ -33,41 +31,35 @@ export namespace AmazonCloudwatch {
|
|
|
33
31
|
export namespace AmazonPinpoint {
|
|
34
32
|
export namespace SendMail {
|
|
35
33
|
export interface Request {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
variables?: Record<string, string | number>;
|
|
43
|
-
};
|
|
34
|
+
applicationId: string;
|
|
35
|
+
subject: string;
|
|
36
|
+
text: string;
|
|
37
|
+
emails: string | string[];
|
|
38
|
+
from: string;
|
|
39
|
+
variables?: Record<string, string | number>;
|
|
44
40
|
credentials: Credentials;
|
|
45
41
|
}
|
|
46
42
|
}
|
|
47
43
|
|
|
48
44
|
export namespace SendTemplateMail {
|
|
49
45
|
export interface Request {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
variables?: Record<string, string | number>;
|
|
56
|
-
};
|
|
46
|
+
applicationId: string;
|
|
47
|
+
template: string;
|
|
48
|
+
emails: string | string[];
|
|
49
|
+
from: string;
|
|
50
|
+
variables?: Record<string, string | number>;
|
|
57
51
|
credentials: Credentials;
|
|
58
52
|
}
|
|
59
53
|
}
|
|
60
54
|
|
|
61
55
|
export namespace SendSMS {
|
|
62
56
|
export interface Request {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
variables?: Record<string, string | number>;
|
|
70
|
-
};
|
|
57
|
+
applicationId: string;
|
|
58
|
+
sender: string;
|
|
59
|
+
text: string;
|
|
60
|
+
phones: string | string[];
|
|
61
|
+
type?: 'PROMOTIONAL' | 'TRANSACTIONAL';
|
|
62
|
+
variables?: Record<string, string | number>;
|
|
71
63
|
credentials: Credentials;
|
|
72
64
|
}
|
|
73
65
|
}
|
|
@@ -76,12 +68,10 @@ export namespace AmazonPinpoint {
|
|
|
76
68
|
export namespace AmazonS3 {
|
|
77
69
|
export namespace GetSignedUrl {
|
|
78
70
|
export interface Request {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
isUpload?: boolean;
|
|
84
|
-
};
|
|
71
|
+
filename: string;
|
|
72
|
+
bucket: string;
|
|
73
|
+
folder?: string;
|
|
74
|
+
isUpload?: boolean;
|
|
85
75
|
credentials: Credentials;
|
|
86
76
|
}
|
|
87
77
|
|
|
@@ -92,11 +82,9 @@ export namespace AmazonS3 {
|
|
|
92
82
|
|
|
93
83
|
export namespace UploadBase64 {
|
|
94
84
|
export interface Request {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
options?: UploadOptions;
|
|
99
|
-
};
|
|
85
|
+
file: string;
|
|
86
|
+
bucket: string;
|
|
87
|
+
options?: UploadOptions;
|
|
100
88
|
credentials: Credentials;
|
|
101
89
|
}
|
|
102
90
|
|
|
@@ -109,11 +97,9 @@ export namespace AmazonS3 {
|
|
|
109
97
|
|
|
110
98
|
export namespace UploadBuffer {
|
|
111
99
|
export interface Request {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
options?: UploadOptions;
|
|
116
|
-
};
|
|
100
|
+
file: Buffer;
|
|
101
|
+
bucket: string;
|
|
102
|
+
options?: UploadOptions;
|
|
117
103
|
credentials: Credentials;
|
|
118
104
|
}
|
|
119
105
|
|
|
@@ -126,21 +112,17 @@ export namespace AmazonS3 {
|
|
|
126
112
|
|
|
127
113
|
export namespace DeleteFile {
|
|
128
114
|
export interface Request {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
folder?: string;
|
|
133
|
-
};
|
|
115
|
+
filename: string;
|
|
116
|
+
bucket: string;
|
|
117
|
+
folder?: string;
|
|
134
118
|
credentials: Credentials;
|
|
135
119
|
}
|
|
136
120
|
}
|
|
137
121
|
|
|
138
122
|
export namespace ListFiles {
|
|
139
123
|
export interface Request {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
folder?: string;
|
|
143
|
-
};
|
|
124
|
+
bucket: string;
|
|
125
|
+
folder?: string;
|
|
144
126
|
credentials: Credentials;
|
|
145
127
|
}
|
|
146
128
|
|
|
@@ -153,9 +135,7 @@ export namespace AmazonS3 {
|
|
|
153
135
|
export namespace AmazonSecretManager {
|
|
154
136
|
export namespace GetSecret {
|
|
155
137
|
export interface Request {
|
|
156
|
-
|
|
157
|
-
secret: string;
|
|
158
|
-
};
|
|
138
|
+
secretId: string;
|
|
159
139
|
credentials: Credentials;
|
|
160
140
|
}
|
|
161
141
|
|
|
@@ -168,19 +148,15 @@ export namespace AmazonSecretManager {
|
|
|
168
148
|
export namespace AmazonSQS {
|
|
169
149
|
export namespace PublishMessage {
|
|
170
150
|
export interface Request {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
message: unknown;
|
|
174
|
-
};
|
|
151
|
+
queue: string;
|
|
152
|
+
message: unknown;
|
|
175
153
|
credentials: Credentials;
|
|
176
154
|
}
|
|
177
155
|
}
|
|
178
156
|
|
|
179
157
|
export namespace ConsumeMessage {
|
|
180
158
|
export interface Request {
|
|
181
|
-
|
|
182
|
-
queue: string;
|
|
183
|
-
};
|
|
159
|
+
queue: string;
|
|
184
160
|
credentials: Credentials;
|
|
185
161
|
}
|
|
186
162
|
|
|
@@ -191,9 +167,7 @@ export namespace AmazonSQS {
|
|
|
191
167
|
|
|
192
168
|
export namespace ConsumeMessages {
|
|
193
169
|
export interface Request {
|
|
194
|
-
|
|
195
|
-
queue: string;
|
|
196
|
-
};
|
|
170
|
+
queue: string;
|
|
197
171
|
credentials: Credentials;
|
|
198
172
|
}
|
|
199
173
|
|
|
@@ -204,29 +178,29 @@ export namespace AmazonSQS {
|
|
|
204
178
|
}
|
|
205
179
|
|
|
206
180
|
export interface IAmazonCloudwatchService {
|
|
207
|
-
createLogEvent(req: AmazonCloudwatch.CreateLogEvent.Request): Promise<void>;
|
|
181
|
+
createLogEvent (req: AmazonCloudwatch.CreateLogEvent.Request): Promise<void>;
|
|
208
182
|
}
|
|
209
183
|
|
|
210
184
|
export interface IAmazonPinpointService {
|
|
211
|
-
sendMail(req: AmazonPinpoint.SendMail.Request): Promise<void>;
|
|
212
|
-
sendTemplateMail(req: AmazonPinpoint.SendTemplateMail.Request): Promise<void>;
|
|
213
|
-
sendSMS(req: AmazonPinpoint.SendSMS.Request): Promise<void>;
|
|
185
|
+
sendMail (req: AmazonPinpoint.SendMail.Request): Promise<void>;
|
|
186
|
+
sendTemplateMail (req: AmazonPinpoint.SendTemplateMail.Request): Promise<void>;
|
|
187
|
+
sendSMS (req: AmazonPinpoint.SendSMS.Request): Promise<void>;
|
|
214
188
|
}
|
|
215
189
|
|
|
216
190
|
export interface IAmazonS3Service {
|
|
217
|
-
getSignedUrl(req: AmazonS3.GetSignedUrl.Request): Promise<AmazonS3.GetSignedUrl.Response>;
|
|
218
|
-
uploadBase64(req: AmazonS3.UploadBase64.Request): Promise<AmazonS3.UploadBase64.Response>;
|
|
219
|
-
uploadBuffer(req: AmazonS3.UploadBuffer.Request): Promise<AmazonS3.UploadBuffer.Response>;
|
|
220
|
-
deleteFile(req: AmazonS3.DeleteFile.Request): Promise<void>;
|
|
221
|
-
listFiles(req: AmazonS3.ListFiles.Request): Promise<AmazonS3.ListFiles.Response>;
|
|
191
|
+
getSignedUrl (req: AmazonS3.GetSignedUrl.Request): Promise<AmazonS3.GetSignedUrl.Response>;
|
|
192
|
+
uploadBase64 (req: AmazonS3.UploadBase64.Request): Promise<AmazonS3.UploadBase64.Response>;
|
|
193
|
+
uploadBuffer (req: AmazonS3.UploadBuffer.Request): Promise<AmazonS3.UploadBuffer.Response>;
|
|
194
|
+
deleteFile (req: AmazonS3.DeleteFile.Request): Promise<void>;
|
|
195
|
+
listFiles (req: AmazonS3.ListFiles.Request): Promise<AmazonS3.ListFiles.Response>;
|
|
222
196
|
}
|
|
223
197
|
|
|
224
198
|
export interface IAmazonSecretManagerService {
|
|
225
|
-
getSecret<T>(req: AmazonSecretManager.GetSecret.Request): Promise<AmazonSecretManager.GetSecret.Response<T>>;
|
|
199
|
+
getSecret <T>(req: AmazonSecretManager.GetSecret.Request): Promise<AmazonSecretManager.GetSecret.Response<T>>;
|
|
226
200
|
}
|
|
227
201
|
|
|
228
202
|
export interface IAmazonSQSService {
|
|
229
|
-
publishMessage(req: AmazonSQS.PublishMessage.Request): Promise<void>;
|
|
230
|
-
consumeMessage<T>(req: AmazonSQS.ConsumeMessage.Request): Promise<AmazonSQS.ConsumeMessage.Response<T>>;
|
|
231
|
-
consumeMessages<T>(req: AmazonSQS.ConsumeMessages.Request): Promise<AmazonSQS.ConsumeMessages.Response<T>>;
|
|
232
|
-
}
|
|
203
|
+
publishMessage (req: AmazonSQS.PublishMessage.Request): Promise<void>;
|
|
204
|
+
consumeMessage<T> (req: AmazonSQS.ConsumeMessage.Request): Promise<AmazonSQS.ConsumeMessage.Response<T>>;
|
|
205
|
+
consumeMessages<T> (req: AmazonSQS.ConsumeMessages.Request): Promise<AmazonSQS.ConsumeMessages.Response<T>>;
|
|
206
|
+
}
|