@darraghor/nest-backend-libs 3.12.3 → 4.0.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/dist/authorization/authz.module.d.ts +4 -0
- package/dist/authorization/authz.module.js +31 -20
- package/dist/authorization/authz.module.js.map +1 -1
- package/dist/authorization/authz.options.d.ts +12 -0
- package/dist/authorization/authz.options.js +2 -0
- package/dist/authorization/authz.options.js.map +1 -0
- package/dist/authorization/config/AuthConfigurationService.d.ts +3 -3
- package/dist/authorization/config/AuthConfigurationService.js +13 -17
- package/dist/authorization/config/AuthConfigurationService.js.map +1 -1
- package/dist/authzclient/AuthClientConfigurationService.d.ts +3 -3
- package/dist/authzclient/AuthClientConfigurationService.js +12 -9
- package/dist/authzclient/AuthClientConfigurationService.js.map +1 -1
- package/dist/authzclient/authz-client.module.d.ts +4 -0
- package/dist/authzclient/authz-client.module.js +27 -14
- package/dist/authzclient/authz-client.module.js.map +1 -1
- package/dist/authzclient/authz-client.options.d.ts +11 -0
- package/dist/authzclient/authz-client.options.js +2 -0
- package/dist/authzclient/authz-client.options.js.map +1 -0
- package/dist/core-config/CoreConfig.module.d.ts +4 -0
- package/dist/core-config/CoreConfig.module.js +24 -9
- package/dist/core-config/CoreConfig.module.js.map +1 -1
- package/dist/core-config/CoreConfigurationService.d.ts +4 -3
- package/dist/core-config/CoreConfigurationService.js +33 -17
- package/dist/core-config/CoreConfigurationService.js.map +1 -1
- package/dist/core-config/core-config.options.d.ts +18 -0
- package/dist/core-config/core-config.options.js +2 -0
- package/dist/core-config/core-config.options.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/invitations/InvitationConfigurationService.d.ts +3 -3
- package/dist/invitations/InvitationConfigurationService.js +11 -8
- package/dist/invitations/InvitationConfigurationService.js.map +1 -1
- package/dist/invitations/invitation.module.d.ts +4 -0
- package/dist/invitations/invitation.module.js +34 -16
- package/dist/invitations/invitation.module.js.map +1 -1
- package/dist/invitations/invitation.options.d.ts +10 -0
- package/dist/invitations/invitation.options.js +2 -0
- package/dist/invitations/invitation.options.js.map +1 -0
- package/dist/logger/LoggingConfigurationService.d.ts +3 -3
- package/dist/logger/LoggingConfigurationService.js +14 -11
- package/dist/logger/LoggingConfigurationService.js.map +1 -1
- package/dist/logger/logger.module.d.ts +4 -0
- package/dist/logger/logger.module.js +24 -9
- package/dist/logger/logger.module.js.map +1 -1
- package/dist/logger/logger.options.d.ts +13 -0
- package/dist/logger/logger.options.js +2 -0
- package/dist/logger/logger.options.js.map +1 -0
- package/dist/root-app/SwaggerGen.js +4 -1
- package/dist/root-app/SwaggerGen.js.map +1 -1
- package/dist/root-app/core-app.module.d.ts +9 -1
- package/dist/root-app/core-app.module.js +101 -65
- package/dist/root-app/core-app.module.js.map +1 -1
- package/dist/smtp-email-client/EmailConfigurationService.d.ts +3 -3
- package/dist/smtp-email-client/EmailConfigurationService.js +18 -16
- package/dist/smtp-email-client/EmailConfigurationService.js.map +1 -1
- package/dist/smtp-email-client/smtp-email-client.module.d.ts +4 -0
- package/dist/smtp-email-client/smtp-email-client.module.js +34 -21
- package/dist/smtp-email-client/smtp-email-client.module.js.map +1 -1
- package/dist/smtp-email-client/smtp-email-client.options.d.ts +17 -0
- package/dist/smtp-email-client/smtp-email-client.options.js +2 -0
- package/dist/smtp-email-client/smtp-email-client.options.js.map +1 -0
- package/dist/stripe-client/StripeClientConfigurationService.d.ts +3 -3
- package/dist/stripe-client/StripeClientConfigurationService.js +13 -10
- package/dist/stripe-client/StripeClientConfigurationService.js.map +1 -1
- package/dist/stripe-client/stripe-account.module.d.ts +4 -0
- package/dist/stripe-client/stripe-account.module.js +50 -39
- package/dist/stripe-client/stripe-account.module.js.map +1 -1
- package/dist/stripe-client/stripe-account.options.d.ts +12 -0
- package/dist/stripe-client/stripe-account.options.js +2 -0
- package/dist/stripe-client/stripe-account.options.js.map +1 -0
- package/dist/twitter-client/TwitterClientConfigurationService.d.ts +3 -3
- package/dist/twitter-client/TwitterClientConfigurationService.js +14 -11
- package/dist/twitter-client/TwitterClientConfigurationService.js.map +1 -1
- package/dist/twitter-client/twitter-account.module.d.ts +4 -0
- package/dist/twitter-client/twitter-account.module.js +26 -14
- package/dist/twitter-client/twitter-account.module.js.map +1 -1
- package/dist/twitter-client/twitter-account.options.d.ts +13 -0
- package/dist/twitter-client/twitter-account.options.js +2 -0
- package/dist/twitter-client/twitter-account.options.js.map +1 -0
- package/package.json +1 -1
- package/dist/authorization/config/AuthConfigurationVariables.d.ts +0 -10
- package/dist/authorization/config/AuthConfigurationVariables.js +0 -7
- package/dist/authorization/config/AuthConfigurationVariables.js.map +0 -1
- package/dist/authzclient/AuthClientConfigurationVariables.d.ts +0 -8
- package/dist/authzclient/AuthClientConfigurationVariables.js +0 -6
- package/dist/authzclient/AuthClientConfigurationVariables.js.map +0 -1
- package/dist/core-config/CoreConfigurationVariables.d.ts +0 -24
- package/dist/core-config/CoreConfigurationVariables.js +0 -14
- package/dist/core-config/CoreConfigurationVariables.js.map +0 -1
- package/dist/invitations/InvitationConfigurationVariables.d.ts +0 -6
- package/dist/invitations/InvitationConfigurationVariables.js +0 -5
- package/dist/invitations/InvitationConfigurationVariables.js.map +0 -1
- package/dist/logger/LoggingConfigurationVariables.d.ts +0 -12
- package/dist/logger/LoggingConfigurationVariables.js +0 -8
- package/dist/logger/LoggingConfigurationVariables.js.map +0 -1
- package/dist/smtp-email-client/EmailConfigurationVariables.d.ts +0 -20
- package/dist/smtp-email-client/EmailConfigurationVariables.js +0 -12
- package/dist/smtp-email-client/EmailConfigurationVariables.js.map +0 -1
- package/dist/stripe-client/StripeConfigurationVariables.d.ts +0 -10
- package/dist/stripe-client/StripeConfigurationVariables.js +0 -7
- package/dist/stripe-client/StripeConfigurationVariables.js.map +0 -1
- package/dist/twitter-client/TwitterConfigurationVariables.d.ts +0 -12
- package/dist/twitter-client/TwitterConfigurationVariables.js +0 -8
- package/dist/twitter-client/TwitterConfigurationVariables.js.map +0 -1
|
@@ -7,41 +7,42 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { Inject, Injectable } from "@nestjs/common";
|
|
13
14
|
import { IsBoolean, IsDefined, IsInt, IsString } from "class-validator";
|
|
14
15
|
import { ValidatedConfigurationService } from "../configuration/ValidatedConfigurationService.js";
|
|
16
|
+
import { SMTP_EMAIL_MODULE_OPTIONS, } from "./smtp-email-client.options.js";
|
|
15
17
|
let EmailConfigurationService = class EmailConfigurationService extends ValidatedConfigurationService {
|
|
16
|
-
|
|
17
|
-
constructor(
|
|
18
|
+
options;
|
|
19
|
+
constructor(options) {
|
|
18
20
|
super();
|
|
19
|
-
this.
|
|
21
|
+
this.options = options;
|
|
20
22
|
}
|
|
21
23
|
get isEmailSyncSendEnabled() {
|
|
22
|
-
return
|
|
23
|
-
"true");
|
|
24
|
+
return this.options.isEmailSyncSendEnabled;
|
|
24
25
|
}
|
|
25
26
|
get extraEmailBcc() {
|
|
26
|
-
return this.
|
|
27
|
+
return this.options.extraEmailBcc;
|
|
27
28
|
}
|
|
28
29
|
get emailPassword() {
|
|
29
|
-
return this.
|
|
30
|
+
return this.options.emailPassword;
|
|
30
31
|
}
|
|
31
32
|
get smtpHost() {
|
|
32
|
-
return this.
|
|
33
|
+
return this.options.smtpHost;
|
|
33
34
|
}
|
|
34
35
|
get smtpPort() {
|
|
35
|
-
return
|
|
36
|
+
return this.options.smtpPort;
|
|
36
37
|
}
|
|
37
38
|
get emailUsername() {
|
|
38
|
-
return this.
|
|
39
|
+
return this.options.emailUsername;
|
|
39
40
|
}
|
|
40
41
|
get senderEmailAddress() {
|
|
41
|
-
return this.
|
|
42
|
+
return this.options.senderEmailAddress;
|
|
42
43
|
}
|
|
43
44
|
get senderName() {
|
|
44
|
-
return this.
|
|
45
|
+
return this.options.senderName;
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
48
|
__decorate([
|
|
@@ -94,7 +95,8 @@ __decorate([
|
|
|
94
95
|
], EmailConfigurationService.prototype, "senderName", null);
|
|
95
96
|
EmailConfigurationService = __decorate([
|
|
96
97
|
Injectable(),
|
|
97
|
-
|
|
98
|
+
__param(0, Inject(SMTP_EMAIL_MODULE_OPTIONS)),
|
|
99
|
+
__metadata("design:paramtypes", [Object])
|
|
98
100
|
], EmailConfigurationService);
|
|
99
101
|
export { EmailConfigurationService };
|
|
100
102
|
//# sourceMappingURL=EmailConfigurationService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailConfigurationService.js","sourceRoot":"","sources":["../../src/smtp-email-client/EmailConfigurationService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EmailConfigurationService.js","sourceRoot":"","sources":["../../src/smtp-email-client/EmailConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAC,6BAA6B,EAAC,MAAM,mDAAmD,CAAC;AAChG,OAAO,EACH,yBAAyB,GAE5B,MAAM,gCAAgC,CAAC;AAGjC,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,6BAA6B;IAG5D;IAFZ,YAEY,OAA+B;QAEvC,KAAK,EAAE,CAAC;QAFA,YAAO,GAAP,OAAO,CAAwB;IAG3C,CAAC;IAED,IAEI,sBAAsB;QACtB,OAAO,IAAI,CA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
1
3
|
export declare class SmtpEmailClientModule {
|
|
4
|
+
static forRoot(): never;
|
|
5
|
+
static forRootAsync(options: SmtpEmailModuleAsyncOptions): DynamicModule;
|
|
2
6
|
}
|
|
@@ -4,37 +4,50 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
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;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
+
var SmtpEmailClientModule_1;
|
|
7
8
|
import { BullModule } from "@nestjs/bull";
|
|
8
9
|
import { Module } from "@nestjs/common";
|
|
9
|
-
import { ConfigModule } from "@nestjs/config";
|
|
10
10
|
import { TypeOrmModule } from "@nestjs/typeorm";
|
|
11
11
|
import { SmtpEmailClient } from "./email-client.service.js";
|
|
12
12
|
import { EmailClientController } from "./email.controller.js";
|
|
13
13
|
import { Email } from "./email.entity.js";
|
|
14
14
|
import { EmailTransporterProvider } from "./EmailTransporterProvider.js";
|
|
15
15
|
import { EmailConfigurationService } from "./EmailConfigurationService.js";
|
|
16
|
-
import configVariables from "./EmailConfigurationVariables.js";
|
|
17
16
|
import { SmtpEmailHandler } from "./smtp-email-handler.js";
|
|
18
|
-
|
|
17
|
+
import { SMTP_EMAIL_MODULE_OPTIONS, } from "./smtp-email-client.options.js";
|
|
18
|
+
let SmtpEmailClientModule = SmtpEmailClientModule_1 = class SmtpEmailClientModule {
|
|
19
|
+
static forRoot() {
|
|
20
|
+
throw new Error("SmtpEmailClientModule.forRoot() is not supported. Use forRootAsync() instead.");
|
|
21
|
+
}
|
|
22
|
+
static forRootAsync(options) {
|
|
23
|
+
return {
|
|
24
|
+
module: SmtpEmailClientModule_1,
|
|
25
|
+
global: options.isGlobal ?? false,
|
|
26
|
+
imports: [
|
|
27
|
+
...(options.imports || []),
|
|
28
|
+
BullModule.registerQueueAsync({
|
|
29
|
+
name: "smtp-emails",
|
|
30
|
+
}),
|
|
31
|
+
TypeOrmModule.forFeature([Email]),
|
|
32
|
+
],
|
|
33
|
+
providers: [
|
|
34
|
+
{
|
|
35
|
+
provide: SMTP_EMAIL_MODULE_OPTIONS,
|
|
36
|
+
useFactory: options.useFactory,
|
|
37
|
+
inject: options.inject || [],
|
|
38
|
+
},
|
|
39
|
+
EmailConfigurationService,
|
|
40
|
+
EmailTransporterProvider,
|
|
41
|
+
SmtpEmailClient,
|
|
42
|
+
SmtpEmailHandler,
|
|
43
|
+
],
|
|
44
|
+
controllers: [EmailClientController],
|
|
45
|
+
exports: [BullModule, SmtpEmailClient],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
19
48
|
};
|
|
20
|
-
SmtpEmailClientModule = __decorate([
|
|
21
|
-
Module({
|
|
22
|
-
imports: [
|
|
23
|
-
BullModule.registerQueueAsync({
|
|
24
|
-
name: "smtp-emails",
|
|
25
|
-
}),
|
|
26
|
-
ConfigModule.forFeature(configVariables),
|
|
27
|
-
TypeOrmModule.forFeature([Email]),
|
|
28
|
-
],
|
|
29
|
-
providers: [
|
|
30
|
-
EmailConfigurationService,
|
|
31
|
-
EmailTransporterProvider,
|
|
32
|
-
SmtpEmailClient,
|
|
33
|
-
SmtpEmailHandler,
|
|
34
|
-
],
|
|
35
|
-
controllers: [EmailClientController],
|
|
36
|
-
exports: [BullModule, SmtpEmailClient],
|
|
37
|
-
})
|
|
49
|
+
SmtpEmailClientModule = SmtpEmailClientModule_1 = __decorate([
|
|
50
|
+
Module({})
|
|
38
51
|
], SmtpEmailClientModule);
|
|
39
52
|
export { SmtpEmailClientModule };
|
|
40
53
|
//# sourceMappingURL=smtp-email-client.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smtp-email-client.module.js","sourceRoot":"","sources":["../../src/smtp-email-client/smtp-email-client.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"smtp-email-client.module.js","sourceRoot":"","sources":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gB;aACnB;YACD,WAAW,EAAE,CAAC,qBAAqB,CAAC;YACpC,OAAO,EAAE,CAAC,UAAU,EAAE,eAAe,CAAC;SACzC,CAAC;IACN,CAAC;CACJ,CAAA;AAjCY,qBAAqB;IADjC,MAAM,CAAC,EAAE,CAAC;GACE,qBAAqB,CAiCjC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ModuleMetadata } from "@nestjs/common";
|
|
2
|
+
export declare const SMTP_EMAIL_MODULE_OPTIONS: unique symbol;
|
|
3
|
+
export interface SmtpEmailModuleOptions {
|
|
4
|
+
smtpHost: string;
|
|
5
|
+
smtpPort: number;
|
|
6
|
+
emailUsername: string;
|
|
7
|
+
emailPassword: string;
|
|
8
|
+
senderEmailAddress: string;
|
|
9
|
+
senderName: string;
|
|
10
|
+
extraEmailBcc: string;
|
|
11
|
+
isEmailSyncSendEnabled: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface SmtpEmailModuleAsyncOptions extends Pick<ModuleMetadata, "imports"> {
|
|
14
|
+
useFactory: (...args: any[]) => Promise<SmtpEmailModuleOptions> | SmtpEmailModuleOptions;
|
|
15
|
+
inject?: any[];
|
|
16
|
+
isGlobal?: boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smtp-email-client.options.js","sourceRoot":"","sources":["../../src/smtp-email-client/smtp-email-client.options.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ConfigService } from "@nestjs/config";
|
|
2
1
|
import { ValidatedConfigurationService } from "../configuration/ValidatedConfigurationService.js";
|
|
2
|
+
import { StripeModuleOptions } from "./stripe-account.options.js";
|
|
3
3
|
export declare class StripeClientConfigurationService extends ValidatedConfigurationService {
|
|
4
|
-
private
|
|
5
|
-
constructor(
|
|
4
|
+
private options;
|
|
5
|
+
constructor(options: StripeModuleOptions);
|
|
6
6
|
get accessToken(): string;
|
|
7
7
|
get webhookVerificationKey(): string;
|
|
8
8
|
get stripeRedirectsBaseUrl(): string;
|
|
@@ -7,25 +7,27 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { Inject, Injectable } from "@nestjs/common";
|
|
13
14
|
import { IsDefined, IsString } from "class-validator";
|
|
14
15
|
import { ValidatedConfigurationService } from "../configuration/ValidatedConfigurationService.js";
|
|
16
|
+
import { STRIPE_MODULE_OPTIONS, } from "./stripe-account.options.js";
|
|
15
17
|
let StripeClientConfigurationService = class StripeClientConfigurationService extends ValidatedConfigurationService {
|
|
16
|
-
|
|
17
|
-
constructor(
|
|
18
|
+
options;
|
|
19
|
+
constructor(options) {
|
|
18
20
|
super();
|
|
19
|
-
this.
|
|
21
|
+
this.options = options;
|
|
20
22
|
}
|
|
21
23
|
get accessToken() {
|
|
22
|
-
return this.
|
|
24
|
+
return this.options.accessToken;
|
|
23
25
|
}
|
|
24
26
|
get webhookVerificationKey() {
|
|
25
|
-
return this.
|
|
27
|
+
return this.options.webhookVerificationKey;
|
|
26
28
|
}
|
|
27
29
|
get stripeRedirectsBaseUrl() {
|
|
28
|
-
return this.
|
|
30
|
+
return this.options.stripeRedirectsBaseUrl;
|
|
29
31
|
}
|
|
30
32
|
};
|
|
31
33
|
__decorate([
|
|
@@ -48,7 +50,8 @@ __decorate([
|
|
|
48
50
|
], StripeClientConfigurationService.prototype, "stripeRedirectsBaseUrl", null);
|
|
49
51
|
StripeClientConfigurationService = __decorate([
|
|
50
52
|
Injectable(),
|
|
51
|
-
|
|
53
|
+
__param(0, Inject(STRIPE_MODULE_OPTIONS)),
|
|
54
|
+
__metadata("design:paramtypes", [Object])
|
|
52
55
|
], StripeClientConfigurationService);
|
|
53
56
|
export { StripeClientConfigurationService };
|
|
54
57
|
//# sourceMappingURL=StripeClientConfigurationService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StripeClientConfigurationService.js","sourceRoot":"","sources":["../../src/stripe-client/StripeClientConfigurationService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StripeClientConfigurationService.js","sourceRoot":"","sources":["../../src/stripe-client/StripeClientConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAC,6BAA6B,EAAC,MAAM,mDAAmD,CAAC;AAChG,OAAO,EACH,qBAAqB,GAExB,MAAM,6BAA6B,CAAC;AAG9B,IAAM,gCAAgC,GAAtC,MAAM,gCAAiC,SAAQ,6BAA6B;IAGnE;IAFZ,YAEY,OAA4B;QAEpC,KAAK,EAAE,CAAC;QAFA,YAAO,GAAP,OAAO,CAAqB;IAGxC,CAAC;IAED,IAEI,WAAW;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;IACpC,CAAC;IAED,IAEI,sBAAsB;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC;IAC/C,CAAC;IAED,IAEI,sBAAsB;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC;IAC/C,CAAC;CACJ,CAAA;AAjBG;IAAC,SAAS,EAAE;IACX,QAAQ,EAAE;;;mEAGV;AAED;IAAC,SAAS,EAAE;IACX,QAAQ,EAAE;;;8EAGV;AAED;IAAC,SAAS,EAAE;IACX,QAAQ,EAAE;;;8EAGV;AAxBQ,gCAAgC;IAD5C,UAAU,EAAE;IAGJ,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;;GAFzB,gCAAgC,CAyB5C"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { DynamicModule } from "@nestjs/common";
|
|
1
2
|
import "reflect-metadata";
|
|
3
|
+
import { StripeModuleAsyncOptions } from "./stripe-account.options.js";
|
|
2
4
|
export declare class StripeAccountModule {
|
|
5
|
+
static forRoot(): never;
|
|
6
|
+
static forRootAsync(options: StripeModuleAsyncOptions): DynamicModule;
|
|
3
7
|
}
|
|
@@ -4,13 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
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;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
+
var StripeAccountModule_1;
|
|
7
8
|
import { Module } from "@nestjs/common";
|
|
8
9
|
import "reflect-metadata";
|
|
9
10
|
import { StripeClientConfigurationService } from "./StripeClientConfigurationService.js";
|
|
10
11
|
import { StripeCheckoutService } from "./services/stripe-checkout.service.js";
|
|
11
|
-
import configVariables from "./StripeConfigurationVariables.js";
|
|
12
|
-
import { ConfigModule } from "@nestjs/config";
|
|
13
|
-
import { CoreModule } from "../root-app/core-app.module.js";
|
|
14
12
|
import { StripeClientProvider } from "./StripeClientProvider.js";
|
|
15
13
|
import { BullModule } from "@nestjs/bull";
|
|
16
14
|
import { TypeOrmModule } from "@nestjs/typeorm";
|
|
@@ -23,43 +21,56 @@ import { PaymentSessionModule } from "../payment-sessions/payment-session.module
|
|
|
23
21
|
import { StripeEventsController } from "./controllers/stripe-events-controller.js";
|
|
24
22
|
import { AuthenticatedStripeCheckoutService } from "./services/auth-stripe-checkout.service.js";
|
|
25
23
|
import SubscriptionRecordMapper from "./services/subscriptionRecord.mapper.js";
|
|
26
|
-
|
|
24
|
+
import { STRIPE_MODULE_OPTIONS, } from "./stripe-account.options.js";
|
|
25
|
+
let StripeAccountModule = StripeAccountModule_1 = class StripeAccountModule {
|
|
26
|
+
static forRoot() {
|
|
27
|
+
throw new Error("StripeAccountModule.forRoot() is not supported. Use forRootAsync() instead.");
|
|
28
|
+
}
|
|
29
|
+
static forRootAsync(options) {
|
|
30
|
+
return {
|
|
31
|
+
module: StripeAccountModule_1,
|
|
32
|
+
global: options.isGlobal ?? false,
|
|
33
|
+
imports: [
|
|
34
|
+
...(options.imports || []),
|
|
35
|
+
BullModule.registerQueueAsync({
|
|
36
|
+
name: "stripe-events",
|
|
37
|
+
}),
|
|
38
|
+
OrganisationSubscriptionsModule,
|
|
39
|
+
PaymentSessionModule,
|
|
40
|
+
TypeOrmModule.forFeature([StripeCheckoutEvent]),
|
|
41
|
+
],
|
|
42
|
+
providers: [
|
|
43
|
+
{
|
|
44
|
+
provide: STRIPE_MODULE_OPTIONS,
|
|
45
|
+
useFactory: options.useFactory,
|
|
46
|
+
inject: options.inject || [],
|
|
47
|
+
},
|
|
48
|
+
AuthenticatedStripeCheckoutService,
|
|
49
|
+
StripeCheckoutService,
|
|
50
|
+
StripeClientConfigurationService,
|
|
51
|
+
StripeClientProvider,
|
|
52
|
+
StripeWebhookHandler,
|
|
53
|
+
SubscriptionRecordMapper,
|
|
54
|
+
],
|
|
55
|
+
exports: [
|
|
56
|
+
AuthenticatedStripeCheckoutService,
|
|
57
|
+
BullModule,
|
|
58
|
+
StripeCheckoutService,
|
|
59
|
+
StripeClientProvider,
|
|
60
|
+
StripeWebhookHandler,
|
|
61
|
+
SubscriptionRecordMapper,
|
|
62
|
+
TypeOrmModule,
|
|
63
|
+
],
|
|
64
|
+
controllers: [
|
|
65
|
+
StripeCustomerPortalController,
|
|
66
|
+
StripeEventsController,
|
|
67
|
+
StripeWebhookController,
|
|
68
|
+
],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
27
71
|
};
|
|
28
|
-
StripeAccountModule = __decorate([
|
|
29
|
-
Module({
|
|
30
|
-
imports: [
|
|
31
|
-
BullModule.registerQueueAsync({
|
|
32
|
-
name: "stripe-events",
|
|
33
|
-
}),
|
|
34
|
-
ConfigModule.forFeature(configVariables),
|
|
35
|
-
CoreModule,
|
|
36
|
-
OrganisationSubscriptionsModule,
|
|
37
|
-
PaymentSessionModule,
|
|
38
|
-
TypeOrmModule.forFeature([StripeCheckoutEvent]),
|
|
39
|
-
],
|
|
40
|
-
providers: [
|
|
41
|
-
AuthenticatedStripeCheckoutService,
|
|
42
|
-
StripeCheckoutService,
|
|
43
|
-
StripeClientConfigurationService,
|
|
44
|
-
StripeClientProvider,
|
|
45
|
-
StripeWebhookHandler,
|
|
46
|
-
SubscriptionRecordMapper,
|
|
47
|
-
],
|
|
48
|
-
exports: [
|
|
49
|
-
AuthenticatedStripeCheckoutService,
|
|
50
|
-
BullModule,
|
|
51
|
-
StripeCheckoutService,
|
|
52
|
-
StripeClientProvider,
|
|
53
|
-
StripeWebhookHandler,
|
|
54
|
-
SubscriptionRecordMapper,
|
|
55
|
-
TypeOrmModule,
|
|
56
|
-
],
|
|
57
|
-
controllers: [
|
|
58
|
-
StripeCustomerPortalController,
|
|
59
|
-
StripeEventsController,
|
|
60
|
-
StripeWebhookController,
|
|
61
|
-
],
|
|
62
|
-
})
|
|
72
|
+
StripeAccountModule = StripeAccountModule_1 = __decorate([
|
|
73
|
+
Module({})
|
|
63
74
|
], StripeAccountModule);
|
|
64
75
|
export { StripeAccountModule };
|
|
65
76
|
//# sourceMappingURL=stripe-account.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe-account.module.js","sourceRoot":"","sources":["../../src/stripe-client/stripe-account.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stripe-account.module.js","sourceRoot":"","sources":["../../src/stripe-client/stripe-account.module.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAgB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xB,CAAC;gBACF,+BAA+B;gBAC/B,oBAAoB;gBACpB,aAAa,CAAC,UAAU,CAAC,CAAC,mBAAmB,CAAC,CAAC;aAClD;YACD,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,qBAAqB;oBAC9B,UAAU,EAAE,OAAO,CAAC,UAAU;oBAC9B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;iBAC/B;gBACD,kCAAkC;gBAClC,qBAAqB;gBACrB,gCAAgC;gBAChC,oBAAoB;gBACpB,oBAAoB;gBACpB,wBAAwB;aAC3B;YACD,OAAO,EAAE;gBACL,kCAAkC;gBAClC,UAAU;gBACV,qBAAqB;gBACrB,oBAAoB;gBACpB,oBAAoB;gBACpB,wBAAwB;gBACxB,aAAa;aAChB;YACD,WAAW,EAAE;gBACT,8BAA8B;gBAC9B,sBAAsB;gBACtB,uBAAuB;aAC1B;SACJ,CAAC;IACN,CAAC;CACJ,CAAA;AAjDY,mBAAmB;IAD/B,MAAM,CAAC,EAAE,CAAC;GACE,mBAAmB,CAiD/B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ModuleMetadata } from "@nestjs/common";
|
|
2
|
+
export declare const STRIPE_MODULE_OPTIONS: unique symbol;
|
|
3
|
+
export interface StripeModuleOptions {
|
|
4
|
+
accessToken: string;
|
|
5
|
+
webhookVerificationKey: string;
|
|
6
|
+
stripeRedirectsBaseUrl: string;
|
|
7
|
+
}
|
|
8
|
+
export interface StripeModuleAsyncOptions extends Pick<ModuleMetadata, "imports"> {
|
|
9
|
+
useFactory: (...args: any[]) => Promise<StripeModuleOptions> | StripeModuleOptions;
|
|
10
|
+
inject?: any[];
|
|
11
|
+
isGlobal?: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stripe-account.options.js","sourceRoot":"","sources":["../../src/stripe-client/stripe-account.options.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ConfigService } from "@nestjs/config";
|
|
2
1
|
import { ValidatedConfigurationService } from "../configuration/ValidatedConfigurationService.js";
|
|
2
|
+
import { TwitterModuleOptions } from "./twitter-account.options.js";
|
|
3
3
|
export declare class TwitterClientConfigurationService extends ValidatedConfigurationService {
|
|
4
|
-
private
|
|
5
|
-
constructor(
|
|
4
|
+
private options;
|
|
5
|
+
constructor(options: TwitterModuleOptions);
|
|
6
6
|
get appSecret(): string;
|
|
7
7
|
get appKey(): string;
|
|
8
8
|
get accessToken(): string;
|
|
@@ -7,28 +7,30 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { Inject, Injectable } from "@nestjs/common";
|
|
13
14
|
import { IsDefined, IsString } from "class-validator";
|
|
14
15
|
import { ValidatedConfigurationService } from "../configuration/ValidatedConfigurationService.js";
|
|
16
|
+
import { TWITTER_MODULE_OPTIONS, } from "./twitter-account.options.js";
|
|
15
17
|
let TwitterClientConfigurationService = class TwitterClientConfigurationService extends ValidatedConfigurationService {
|
|
16
|
-
|
|
17
|
-
constructor(
|
|
18
|
+
options;
|
|
19
|
+
constructor(options) {
|
|
18
20
|
super();
|
|
19
|
-
this.
|
|
21
|
+
this.options = options;
|
|
20
22
|
}
|
|
21
23
|
get appSecret() {
|
|
22
|
-
return this.
|
|
24
|
+
return this.options.appSecret;
|
|
23
25
|
}
|
|
24
26
|
get appKey() {
|
|
25
|
-
return this.
|
|
27
|
+
return this.options.appKey;
|
|
26
28
|
}
|
|
27
29
|
get accessToken() {
|
|
28
|
-
return this.
|
|
30
|
+
return this.options.accessToken;
|
|
29
31
|
}
|
|
30
32
|
get accessSecret() {
|
|
31
|
-
return this.
|
|
33
|
+
return this.options.accessSecret;
|
|
32
34
|
}
|
|
33
35
|
};
|
|
34
36
|
__decorate([
|
|
@@ -57,7 +59,8 @@ __decorate([
|
|
|
57
59
|
], TwitterClientConfigurationService.prototype, "accessSecret", null);
|
|
58
60
|
TwitterClientConfigurationService = __decorate([
|
|
59
61
|
Injectable(),
|
|
60
|
-
|
|
62
|
+
__param(0, Inject(TWITTER_MODULE_OPTIONS)),
|
|
63
|
+
__metadata("design:paramtypes", [Object])
|
|
61
64
|
], TwitterClientConfigurationService);
|
|
62
65
|
export { TwitterClientConfigurationService };
|
|
63
66
|
//# sourceMappingURL=TwitterClientConfigurationService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TwitterClientConfigurationService.js","sourceRoot":"","sources":["../../src/twitter-client/TwitterClientConfigurationService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TwitterClientConfigurationService.js","sourceRoot":"","sources":["../../src/twitter-client/TwitterClientConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAC,6BAA6B,EAAC,MAAM,mDAAmD,CAAC;AAChG,OAAO,EACH,sBAAsB,GAEzB,MAAM,8BAA8B,CAAC;AAG/B,IAAM,iCAAiC,GAAvC,MAAM,iCAAkC,SAAQ,6BAA6B;IAGpE;IAFZ,YAEY,OAA6B;QAErC,KAAK,EAAE,CAAC;QAFA,YAAO,GAAP,OAAO,CAAsB;IAGzC,CAAC;IAED,IAEI,SAAS;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;IAClC,CAAC;IAED,IAEI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IAC/B,CAAC;IAED,IAEI,WAAW;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;IACpC,CAAC;IAED,IAEI,YAAY;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;IACrC,CAAC;CACJ,CAAA;AAvBG;IAAC,SAAS,EAAE;IACX,QAAQ,EAAE;;;kEAGV;AAED;IAAC,SAAS,EAAE;IACX,QAAQ,EAAE;;;+DAGV;AAED;IAAC,SAAS,EAAE;IACX,QAAQ,EAAE;;;oEAGV;AAED;IAAC,SAAS,EAAE;IACX,QAAQ,EAAE;;;qEAGV;AA9BQ,iCAAiC;IAD7C,UAAU,EAAE;IAGJ,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;;GAF1B,iCAAiC,CA+B7C"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { DynamicModule } from "@nestjs/common";
|
|
1
2
|
import "reflect-metadata";
|
|
3
|
+
import { TwitterModuleAsyncOptions } from "./twitter-account.options.js";
|
|
2
4
|
export declare class TwitterAccountModule {
|
|
5
|
+
static forRoot(): never;
|
|
6
|
+
static forRootAsync(options: TwitterModuleAsyncOptions): DynamicModule;
|
|
3
7
|
}
|
|
@@ -4,26 +4,38 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
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;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
+
var TwitterAccountModule_1;
|
|
7
8
|
import { Module } from "@nestjs/common";
|
|
8
9
|
import "reflect-metadata";
|
|
9
10
|
import { TwitterClientConfigurationService } from "./TwitterClientConfigurationService.js";
|
|
10
11
|
import { TwitterClientService } from "./services/twitter-client.service.js";
|
|
11
|
-
import configVariables from "./TwitterConfigurationVariables.js";
|
|
12
|
-
import { ConfigModule } from "@nestjs/config";
|
|
13
12
|
import { TwitterClientProvider } from "./TwitterClientProvider.js";
|
|
14
|
-
|
|
13
|
+
import { TWITTER_MODULE_OPTIONS, } from "./twitter-account.options.js";
|
|
14
|
+
let TwitterAccountModule = TwitterAccountModule_1 = class TwitterAccountModule {
|
|
15
|
+
static forRoot() {
|
|
16
|
+
throw new Error("TwitterAccountModule.forRoot() is not supported. Use forRootAsync() instead.");
|
|
17
|
+
}
|
|
18
|
+
static forRootAsync(options) {
|
|
19
|
+
return {
|
|
20
|
+
module: TwitterAccountModule_1,
|
|
21
|
+
global: options.isGlobal ?? false,
|
|
22
|
+
imports: [...(options.imports || [])],
|
|
23
|
+
providers: [
|
|
24
|
+
{
|
|
25
|
+
provide: TWITTER_MODULE_OPTIONS,
|
|
26
|
+
useFactory: options.useFactory,
|
|
27
|
+
inject: options.inject || [],
|
|
28
|
+
},
|
|
29
|
+
TwitterClientConfigurationService,
|
|
30
|
+
TwitterClientProvider,
|
|
31
|
+
TwitterClientService,
|
|
32
|
+
],
|
|
33
|
+
exports: [TwitterClientService],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
15
36
|
};
|
|
16
|
-
TwitterAccountModule = __decorate([
|
|
17
|
-
Module({
|
|
18
|
-
imports: [ConfigModule.forFeature(configVariables)],
|
|
19
|
-
providers: [
|
|
20
|
-
TwitterClientConfigurationService,
|
|
21
|
-
TwitterClientProvider,
|
|
22
|
-
TwitterClientService,
|
|
23
|
-
],
|
|
24
|
-
exports: [TwitterClientService],
|
|
25
|
-
controllers: [],
|
|
26
|
-
})
|
|
37
|
+
TwitterAccountModule = TwitterAccountModule_1 = __decorate([
|
|
38
|
+
Module({})
|
|
27
39
|
], TwitterAccountModule);
|
|
28
40
|
export { TwitterAccountModule };
|
|
29
41
|
//# sourceMappingURL=twitter-account.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twitter-account.module.js","sourceRoot":"","sources":["../../src/twitter-client/twitter-account.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"twitter-account.module.js","sourceRoot":"","sources":["../../src/twitter-client/twitter-account.module.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAgB,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACrD,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAC,iCAAiC,EAAC,MAAM,wCAAwC,CAAC;AACzF,OAAO,EAAC,oBAAoB,EAAC,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAC,qBAAqB,EAAC,MAAM,4BAA4B,CAAC;AACjE,OAAO,EACH,sBAAsB,GAEzB,MAAM,8BAA8B,CAAC;AAG/B,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IAC7B,MAAM,CAAC,OAAO;QACV,MAAM,IAAI,KAAK,CACX,8EAA8E,CACjF,CAAC;IACN,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,OAAkC;QAClD,OAAO;YACH,MAAM,EAAE,sBAAoB;YAC5B,MAAM,EAAE,OAAO,CAAC,QAAQ,IAAI,KAAK;YACjC,OAAO,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;YACrC,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,sBAAsB;oBAC/B,UAAU,EAAE,OAAO,CAAC,UAAU;oBAC9B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;iBAC/B;gBACD,iCAAiC;gBACjC,qBAAqB;gBACrB,oBAAoB;aACvB;YACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;SAClC,CAAC;IACN,CAAC;CACJ,CAAA;AAzBY,oBAAoB;IADhC,MAAM,CAAC,EAAE,CAAC;GACE,oBAAoB,CAyBhC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ModuleMetadata } from "@nestjs/common";
|
|
2
|
+
export declare const TWITTER_MODULE_OPTIONS: unique symbol;
|
|
3
|
+
export interface TwitterModuleOptions {
|
|
4
|
+
appKey: string;
|
|
5
|
+
appSecret: string;
|
|
6
|
+
accessToken: string;
|
|
7
|
+
accessSecret: string;
|
|
8
|
+
}
|
|
9
|
+
export interface TwitterModuleAsyncOptions extends Pick<ModuleMetadata, "imports"> {
|
|
10
|
+
useFactory: (...args: any[]) => Promise<TwitterModuleOptions> | TwitterModuleOptions;
|
|
11
|
+
inject?: any[];
|
|
12
|
+
isGlobal?: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twitter-account.options.js","sourceRoot":"","sources":["../../src/twitter-client/twitter-account.options.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
declare const _default: (() => {
|
|
2
|
-
auth0Domain: string | undefined;
|
|
3
|
-
auth0audience: string | undefined;
|
|
4
|
-
superUserIds: string | undefined;
|
|
5
|
-
}) & import("@nestjs/config").ConfigFactoryKeyHost<{
|
|
6
|
-
auth0Domain: string | undefined;
|
|
7
|
-
auth0audience: string | undefined;
|
|
8
|
-
superUserIds: string | undefined;
|
|
9
|
-
}>;
|
|
10
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { registerAs } from "@nestjs/config";
|
|
2
|
-
export default registerAs("auth", () => ({
|
|
3
|
-
auth0Domain: process.env.AUTH0_DOMAIN,
|
|
4
|
-
auth0audience: process.env.AUTH0_AUDIENCE,
|
|
5
|
-
superUserIds: process.env.SUPER_USER_IDS,
|
|
6
|
-
}));
|
|
7
|
-
//# sourceMappingURL=AuthConfigurationVariables.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthConfigurationVariables.js","sourceRoot":"","sources":["../../../src/authorization/config/AuthConfigurationVariables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAE1C,eAAe,UAAU,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IACrC,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY;IACrC,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc;IACzC,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc;CAC3C,CAAC,CAAC,CAAC"}
|