@darraghor/nest-backend-libs 5.7.4 → 6.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/README.md +87 -36
- package/dist/cli/commands/WriteApiClientCommand.js +1 -2
- package/dist/cli/commands/WriteApiClientCommand.js.map +1 -1
- package/dist/database-sqlite/SqliteTypeOrmConfigurationProvider.js +5 -4
- package/dist/database-sqlite/SqliteTypeOrmConfigurationProvider.js.map +1 -1
- package/dist/exports/authorization.d.ts +14 -0
- package/dist/exports/authorization.js +12 -0
- package/dist/exports/authorization.js.map +1 -0
- package/dist/exports/core.d.ts +11 -0
- package/dist/exports/core.js +10 -0
- package/dist/exports/core.js.map +1 -0
- package/dist/exports/database.d.ts +5 -0
- package/dist/exports/database.js +6 -0
- package/dist/exports/database.js.map +1 -0
- package/dist/exports/email.d.ts +4 -0
- package/dist/exports/email.js +4 -0
- package/dist/exports/email.js.map +1 -0
- package/dist/exports/invitations.d.ts +6 -0
- package/dist/exports/invitations.js +6 -0
- package/dist/exports/invitations.js.map +1 -0
- package/dist/exports/organisations.d.ts +11 -0
- package/dist/exports/organisations.js +12 -0
- package/dist/exports/organisations.js.map +1 -0
- package/dist/exports/stripe-legacy.d.ts +6 -0
- package/dist/exports/stripe-legacy.js +7 -0
- package/dist/exports/stripe-legacy.js.map +1 -0
- package/dist/exports/stripe.d.ts +11 -0
- package/dist/exports/stripe.js +9 -0
- package/dist/exports/stripe.js.map +1 -0
- package/dist/exports/twitter.d.ts +5 -0
- package/dist/exports/twitter.js +5 -0
- package/dist/exports/twitter.js.map +1 -0
- package/dist/exports/users.d.ts +10 -0
- package/dist/exports/users.js +11 -0
- package/dist/exports/users.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/organisation-subscriptions/entities/organisation-subscription.entity.js +2 -1
- package/dist/organisation-subscriptions/entities/organisation-subscription.entity.js.map +1 -1
- package/dist/stripe-client/StripeClientConfigurationService.js +1 -0
- package/dist/stripe-client/StripeClientConfigurationService.js.map +1 -1
- package/dist/stripe-client/StripeClientProvider.js +1 -1
- package/dist/stripe-client/StripeClientProvider.js.map +1 -1
- package/dist/stripe-client/controllers/stripe-checkout-controller.d.ts +1 -0
- package/dist/stripe-client/controllers/stripe-checkout-controller.js +1 -0
- package/dist/stripe-client/controllers/stripe-checkout-controller.js.map +1 -1
- package/dist/stripe-client/controllers/stripe-events-controller.js +1 -0
- package/dist/stripe-client/controllers/stripe-events-controller.js.map +1 -1
- package/dist/stripe-client/controllers/stripe-unauthenticated-checkout-controller.js +1 -0
- package/dist/stripe-client/controllers/stripe-unauthenticated-checkout-controller.js.map +1 -1
- package/dist/stripe-client/controllers/stripe-webhook-controller.js +1 -4
- package/dist/stripe-client/controllers/stripe-webhook-controller.js.map +1 -1
- package/dist/stripe-client/services/auth-stripe-checkout.service.js +1 -0
- package/dist/stripe-client/services/auth-stripe-checkout.service.js.map +1 -1
- package/dist/stripe-client/services/queued-payment-event.handler.d.ts +1 -0
- package/dist/stripe-client/services/queued-payment-event.handler.js +2 -0
- package/dist/stripe-client/services/queued-payment-event.handler.js.map +1 -1
- package/dist/stripe-client/services/stripe-checkout.service.d.ts +1 -0
- package/dist/stripe-client/services/stripe-checkout.service.js +2 -0
- package/dist/stripe-client/services/stripe-checkout.service.js.map +1 -1
- package/dist/stripe-client/stripe-account.module.d.ts +1 -0
- package/dist/stripe-client/stripe-account.module.js +2 -0
- package/dist/stripe-client/stripe-account.module.js.map +1 -1
- package/dist/stripe-client/stripe-account.options.d.ts +2 -0
- package/dist/stripe-client/stripe-account.options.js.map +1 -1
- package/dist/stripe-payments/controllers/secure-stripe-checkout.controller.d.ts +10 -0
- package/dist/stripe-payments/controllers/secure-stripe-checkout.controller.js +65 -0
- package/dist/stripe-payments/controllers/secure-stripe-checkout.controller.js.map +1 -0
- package/dist/stripe-payments/controllers/secure-stripe-events.controller.d.ts +9 -0
- package/dist/stripe-payments/controllers/secure-stripe-events.controller.js +65 -0
- package/dist/stripe-payments/controllers/secure-stripe-events.controller.js.map +1 -0
- package/dist/stripe-payments/controllers/secure-stripe-webhook.controller.d.ts +14 -0
- package/dist/stripe-payments/controllers/secure-stripe-webhook.controller.js +112 -0
- package/dist/stripe-payments/controllers/secure-stripe-webhook.controller.js.map +1 -0
- package/dist/stripe-payments/entities/stripe-checkout-attempt.entity.d.ts +15 -0
- package/dist/stripe-payments/entities/stripe-checkout-attempt.entity.js +88 -0
- package/dist/stripe-payments/entities/stripe-checkout-attempt.entity.js.map +1 -0
- package/dist/stripe-payments/entities/stripe-payment-event.entity.d.ts +16 -0
- package/dist/stripe-payments/entities/stripe-payment-event.entity.js +101 -0
- package/dist/stripe-payments/entities/stripe-payment-event.entity.js.map +1 -0
- package/dist/stripe-payments/entities/stripe-payment-state.entity.d.ts +9 -0
- package/dist/stripe-payments/entities/stripe-payment-state.entity.js +53 -0
- package/dist/stripe-payments/entities/stripe-payment-state.entity.js.map +1 -0
- package/dist/stripe-payments/models/secure-checkout.dto.d.ts +14 -0
- package/dist/stripe-payments/models/secure-checkout.dto.js +105 -0
- package/dist/stripe-payments/models/secure-checkout.dto.js.map +1 -0
- package/dist/stripe-payments/models/secure-payment-response.dto.d.ts +7 -0
- package/dist/stripe-payments/models/secure-payment-response.dto.js +30 -0
- package/dist/stripe-payments/models/secure-payment-response.dto.js.map +1 -0
- package/dist/stripe-payments/services/default-stripe-payments-entitlement-store.d.ts +12 -0
- package/dist/stripe-payments/services/default-stripe-payments-entitlement-store.js +49 -0
- package/dist/stripe-payments/services/default-stripe-payments-entitlement-store.js.map +1 -0
- package/dist/stripe-payments/services/secure-stripe-checkout.service.d.ts +24 -0
- package/dist/stripe-payments/services/secure-stripe-checkout.service.js +213 -0
- package/dist/stripe-payments/services/secure-stripe-checkout.service.js.map +1 -0
- package/dist/stripe-payments/services/secure-stripe-client.provider.d.ts +2 -0
- package/dist/stripe-payments/services/secure-stripe-client.provider.js +15 -0
- package/dist/stripe-payments/services/secure-stripe-client.provider.js.map +1 -0
- package/dist/stripe-payments/services/secure-stripe-product.service.d.ts +9 -0
- package/dist/stripe-payments/services/secure-stripe-product.service.js +54 -0
- package/dist/stripe-payments/services/secure-stripe-product.service.js.map +1 -0
- package/dist/stripe-payments/services/secure-stripe-webhook.service.d.ts +14 -0
- package/dist/stripe-payments/services/secure-stripe-webhook.service.js +58 -0
- package/dist/stripe-payments/services/secure-stripe-webhook.service.js.map +1 -0
- package/dist/stripe-payments/services/secure-subscription.service.d.ts +18 -0
- package/dist/stripe-payments/services/secure-subscription.service.js +217 -0
- package/dist/stripe-payments/services/secure-subscription.service.js.map +1 -0
- package/dist/stripe-payments/services/stripe-payment-event.processor.d.ts +15 -0
- package/dist/stripe-payments/services/stripe-payment-event.processor.js +78 -0
- package/dist/stripe-payments/services/stripe-payment-event.processor.js.map +1 -0
- package/dist/stripe-payments/services/stripe-payment-event.service.d.ts +20 -0
- package/dist/stripe-payments/services/stripe-payment-event.service.js +178 -0
- package/dist/stripe-payments/services/stripe-payment-event.service.js.map +1 -0
- package/dist/stripe-payments/services/stripe-payment-fulfillment.service.d.ts +31 -0
- package/dist/stripe-payments/services/stripe-payment-fulfillment.service.js +331 -0
- package/dist/stripe-payments/services/stripe-payment-fulfillment.service.js.map +1 -0
- package/dist/stripe-payments/services/stripe-payments-operations.service.d.ts +25 -0
- package/dist/stripe-payments/services/stripe-payments-operations.service.js +59 -0
- package/dist/stripe-payments/services/stripe-payments-operations.service.js.map +1 -0
- package/dist/stripe-payments/services/stripe-payments-telemetry.service.d.ts +7 -0
- package/dist/stripe-payments/services/stripe-payments-telemetry.service.js +40 -0
- package/dist/stripe-payments/services/stripe-payments-telemetry.service.js.map +1 -0
- package/dist/stripe-payments/stripe-payment.config.d.ts +19 -0
- package/dist/stripe-payments/stripe-payment.config.js +98 -0
- package/dist/stripe-payments/stripe-payment.config.js.map +1 -0
- package/dist/stripe-payments/stripe-payment.config.test.d.ts +1 -0
- package/dist/stripe-payments/stripe-payment.config.test.js +59 -0
- package/dist/stripe-payments/stripe-payment.config.test.js.map +1 -0
- package/dist/stripe-payments/stripe-payments.extensions.d.ts +69 -0
- package/dist/stripe-payments/stripe-payments.extensions.js +30 -0
- package/dist/stripe-payments/stripe-payments.extensions.js.map +1 -0
- package/dist/stripe-payments/stripe-payments.module.d.ts +12 -0
- package/dist/stripe-payments/stripe-payments.module.js +118 -0
- package/dist/stripe-payments/stripe-payments.module.js.map +1 -0
- package/dist/stripe-payments/stripe-payments.options.d.ts +21 -0
- package/dist/stripe-payments/stripe-payments.options.js +2 -0
- package/dist/stripe-payments/stripe-payments.options.js.map +1 -0
- package/dist/typeorm/entities.d.ts +15 -0
- package/dist/typeorm/entities.js +32 -0
- package/dist/typeorm/entities.js.map +1 -0
- package/package.json +85 -38
|
@@ -23,6 +23,7 @@ import { AuthenticatedStripeCheckoutService } from "../services/auth-stripe-chec
|
|
|
23
23
|
*
|
|
24
24
|
* This is not automatically included in the StripeClientModule.
|
|
25
25
|
*/
|
|
26
|
+
/** @deprecated Use StripePaymentsModule's opinionated checkout controller. */
|
|
26
27
|
let StripeCheckoutController = class StripeCheckoutController {
|
|
27
28
|
stripeService;
|
|
28
29
|
constructor(stripeService) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe-checkout-controller.js","sourceRoot":"","sources":["../../../src/stripe-client/controllers/stripe-checkout-controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAC,aAAa,EAAE,OAAO,EAAE,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAC,gBAAgB,EAAC,MAAM,gDAAgD,CAAC;AAEhF,OAAO,EAAC,+BAA+B,EAAC,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAC,gCAAgC,EAAC,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAC,kCAAkC,EAAC,MAAM,6CAA6C,CAAC;AAE/F;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"stripe-checkout-controller.js","sourceRoot":"","sources":["../../../src/stripe-client/controllers/stripe-checkout-controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAC,aAAa,EAAE,OAAO,EAAE,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAC,gBAAgB,EAAC,MAAM,gDAAgD,CAAC;AAEhF,OAAO,EAAC,+BAA+B,EAAC,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAC,gCAAgC,EAAC,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAC,kCAAkC,EAAC,MAAM,6CAA6C,CAAC;AAE/F;;;;;;GAMG;AACH,8EAA8E;AAKvE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAEZ;IADrB,YACqB,aAAiD;QAAjD,kBAAa,GAAb,aAAa,CAAoC;IACnE,CAAC;IAIE,AAAN,KAAK,CAAC,qBAAqB,CACZ,OAAwB,EAC3B,gBAAiD;QAEzD,OAAO,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAC3C,gBAAgB,EAChB,OAAO,CAAC,IAAI,CACf,CAAC;IACN,CAAC;CACJ,CAAA;AATS;IAFL,IAAI,CAAC,kBAAkB,CAAC;IACxB,aAAa,CAAC,EAAC,IAAI,EAAE,gCAAgC,EAAC,CAAC;IAEnD,WAAA,OAAO,EAAE,CAAA;IACT,WAAA,IAAI,EAAE,CAAA;;6CAAmB,+BAA+B;;qEAM5D;AAfQ,wBAAwB;IAJpC,SAAS,CAAC,gBAAgB,CAAC;IAC3B,aAAa,EAAE;IACf,UAAU,CAAC,iBAAiB,CAAC;IAC7B,OAAO,CAAC,UAAU,CAAC;qCAGoB,kCAAkC;GAF7D,wBAAwB,CAgBpC"}
|
|
@@ -10,6 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
|
+
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
13
14
|
import { UseGuards, Controller, Request, Get, Query } from "@nestjs/common";
|
|
14
15
|
import { ApiBearerAuth, ApiTags, ApiOkResponse, ApiQuery, ApiOperation, } from "@nestjs/swagger";
|
|
15
16
|
import { StripeCheckoutService } from "../services/stripe-checkout.service.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe-events-controller.js","sourceRoot":"","sources":["../../../src/stripe-client/controllers/stripe-events-controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EACH,aAAa,EACb,OAAO,EACP,aAAa,EACb,QAAQ,EACR,YAAY,GACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAC,qBAAqB,EAAC,MAAM,wCAAwC,CAAC;AAE7E,OAAO,EAAC,mBAAmB,EAAC,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAC,wBAAwB,EAAC,MAAM,wDAAwD,CAAC;AAChG,OAAO,EAAC,gBAAgB,EAAC,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAC,mBAAmB,EAAC,MAAM,6DAA6D,CAAC;AAWzF,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACF;IAA7B,YAA6B,aAAoC;QAApC,kBAAa,GAAb,aAAa,CAAuB;IAAG,CAAC;IAQ/D,AAAN,KAAK,CAAC,aAAa,CACJ,OAAwB,EAC1B,KAAiB;QAE1B,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC;CACJ,CAAA;AANS;IANL,mBAAmB,CAAC,UAAU,CAAC;IAC/B,YAAY,CAAC,EAAC,IAAI,EAAE,CAAC,YAAY,CAAC,EAAC,CAAC;IACpC,GAAG,EAAE;IACL,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAC,CAAC;IACtD,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAC,CAAC;IACtD,aAAa,CAAC,EAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;IAErD,WAAA,OAAO,EAAE,CAAA;IACT,WAAA,KAAK,EAAE,CAAA;;;;2DAGX;AAdQ,sBAAsB;IAJlC,SAAS,CAAC,gBAAgB,EAAE,wBAAwB,CAAC;IACrD,aAAa,EAAE;IACf,UAAU,CAAC,wBAAwB,CAAC;IACpC,OAAO,CAAC,UAAU,CAAC;qCAE4B,qBAAqB;GADxD,sBAAsB,CAelC"}
|
|
1
|
+
{"version":3,"file":"stripe-events-controller.js","sourceRoot":"","sources":["../../../src/stripe-client/controllers/stripe-events-controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAqD;AACrD,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EACH,aAAa,EACb,OAAO,EACP,aAAa,EACb,QAAQ,EACR,YAAY,GACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAC,qBAAqB,EAAC,MAAM,wCAAwC,CAAC;AAE7E,OAAO,EAAC,mBAAmB,EAAC,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAC,wBAAwB,EAAC,MAAM,wDAAwD,CAAC;AAChG,OAAO,EAAC,gBAAgB,EAAC,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAC,mBAAmB,EAAC,MAAM,6DAA6D,CAAC;AAWzF,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACF;IAA7B,YAA6B,aAAoC;QAApC,kBAAa,GAAb,aAAa,CAAuB;IAAG,CAAC;IAQ/D,AAAN,KAAK,CAAC,aAAa,CACJ,OAAwB,EAC1B,KAAiB;QAE1B,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC;CACJ,CAAA;AANS;IANL,mBAAmB,CAAC,UAAU,CAAC;IAC/B,YAAY,CAAC,EAAC,IAAI,EAAE,CAAC,YAAY,CAAC,EAAC,CAAC;IACpC,GAAG,EAAE;IACL,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAC,CAAC;IACtD,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAC,CAAC;IACtD,aAAa,CAAC,EAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;IAErD,WAAA,OAAO,EAAE,CAAA;IACT,WAAA,KAAK,EAAE,CAAA;;;;2DAGX;AAdQ,sBAAsB;IAJlC,SAAS,CAAC,gBAAgB,EAAE,wBAAwB,CAAC;IACrD,aAAa,EAAE;IACf,UAAU,CAAC,wBAAwB,CAAC;IACpC,OAAO,CAAC,UAAU,CAAC;qCAE4B,qBAAqB;GADxD,sBAAsB,CAelC"}
|
|
@@ -10,6 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
|
+
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
13
14
|
import { Controller, Post, Body } from "@nestjs/common";
|
|
14
15
|
import { ApiTags, ApiOkResponse } from "@nestjs/swagger";
|
|
15
16
|
import { StripeCheckoutSessionRequestDto } from "./../models/StripeCheckoutSessionRequestDto.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe-unauthenticated-checkout-controller.js","sourceRoot":"","sources":["../../../src/stripe-client/controllers/stripe-unauthenticated-checkout-controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAC,OAAO,EAAE,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAC,+BAA+B,EAAC,MAAM,gDAAgD,CAAC;AAC/F,OAAO,EAAC,qBAAqB,EAAC,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAC,gCAAgC,EAAC,MAAM,iDAAiD,CAAC;AAEjG;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"stripe-unauthenticated-checkout-controller.js","sourceRoot":"","sources":["../../../src/stripe-client/controllers/stripe-unauthenticated-checkout-controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAqD;AACrD,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAC,OAAO,EAAE,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAC,+BAA+B,EAAC,MAAM,gDAAgD,CAAC;AAC/F,OAAO,EAAC,qBAAqB,EAAC,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAC,gCAAgC,EAAC,MAAM,iDAAiD,CAAC;AAEjG;;;;;;GAMG;AAGI,IAAM,uCAAuC,GAA7C,MAAM,uCAAuC;IACnB;IAA7B,YAA6B,aAAoC;QAApC,kBAAa,GAAb,aAAa,CAAuB;IAAG,CAAC;IAI/D,AAAN,KAAK,CAAC,qBAAqB,CACf,gBAAiD;QAEzD,OAAO,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;IACtE,CAAC;CACJ,CAAA;AALS;IAFL,IAAI,CAAC,kCAAkC,CAAC;IACxC,aAAa,CAAC,EAAC,IAAI,EAAE,gCAAgC,EAAC,CAAC;IAEnD,WAAA,IAAI,EAAE,CAAA;;qCAAmB,+BAA+B;;oFAG5D;AATQ,uCAAuC;IAFnD,UAAU,CAAC,iBAAiB,CAAC;IAC7B,OAAO,CAAC,UAAU,CAAC;qCAE4B,qBAAqB;GADxD,uCAAuC,CAUnD"}
|
|
@@ -31,7 +31,6 @@ let StripeWebhookController = class StripeWebhookController {
|
|
|
31
31
|
this.stripeWebhookService = stripeWebhookService;
|
|
32
32
|
this.queue = queue;
|
|
33
33
|
}
|
|
34
|
-
// eslint-disable-next-line unicorn/prevent-abbreviations
|
|
35
34
|
async webhookReceiver(req) {
|
|
36
35
|
return this.stripeWebhookService.handleWebhook(req);
|
|
37
36
|
}
|
|
@@ -70,9 +69,7 @@ let StripeWebhookController = class StripeWebhookController {
|
|
|
70
69
|
__decorate([
|
|
71
70
|
Post("webhook-receiver"),
|
|
72
71
|
ApiOkResponse(),
|
|
73
|
-
ApiBadRequestResponse()
|
|
74
|
-
// eslint-disable-next-line unicorn/prevent-abbreviations
|
|
75
|
-
,
|
|
72
|
+
ApiBadRequestResponse(),
|
|
76
73
|
__param(0, Req()),
|
|
77
74
|
__metadata("design:type", Function),
|
|
78
75
|
__metadata("design:paramtypes", [Object]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe-webhook-controller.js","sourceRoot":"","sources":["../../../src/stripe-client/controllers/stripe-webhook-controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACH,UAAU,EACV,GAAG,EACH,IAAI,EAEJ,GAAG,EACH,SAAS,GACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACH,OAAO,EACP,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,YAAY,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,KAAK,EAAC,MAAM,QAAQ,CAAC;AAE7B,OAAO,EAAC,oBAAoB,EAAC,MAAM,iDAAiD,CAAC;AACrF,OAAO,EAAC,YAAY,EAAC,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAC,wBAAwB,EAAC,MAAM,wDAAwD,CAAC;AAChG,OAAO,EAAC,gBAAgB,EAAC,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAC,mBAAmB,EAAC,MAAM,6DAA6D,CAAC;AAEhG;;;;GAIG;AAGI,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAEX;IAET;IAHZ,YACqB,oBAA0C,EAEnD,KAAY;QAFH,yBAAoB,GAApB,oBAAoB,CAAsB;QAEnD,UAAK,GAAL,KAAK,CAAO;IACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"stripe-webhook-controller.js","sourceRoot":"","sources":["../../../src/stripe-client/controllers/stripe-webhook-controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACH,UAAU,EACV,GAAG,EACH,IAAI,EAEJ,GAAG,EACH,SAAS,GACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACH,OAAO,EACP,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,YAAY,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,KAAK,EAAC,MAAM,QAAQ,CAAC;AAE7B,OAAO,EAAC,oBAAoB,EAAC,MAAM,iDAAiD,CAAC;AACrF,OAAO,EAAC,YAAY,EAAC,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAC,wBAAwB,EAAC,MAAM,wDAAwD,CAAC;AACh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AAI,IAAI,CAAC,GAAG,CAAC,WAAW,IAAI,CAAC,CAAC;gBAE9C,MAAM,EAAE,GAAG,CAAC,WAAW;gBAEvB,IAAI,EAAE,GAAG,CAAC,IAAI;gBACd,UAAU,EAAE,GAAG,CAAC,YAAY;aAC/B,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AAtDS;IAHL,IAAI,CAAC,kBAAkB,CAAC;IACxB,aAAa,EAAE;IACf,qBAAqB,EAAE;IACD,WAAA,GAAG,EAAE,CAAA;;;;8DAE3B;AAQK;IANL,SAAS,CAAC,gBAAgB,EAAE,wBAAwB,CAAC;IACrD,aAAa,EAAE;IACf,YAAY,CAAC,EAAC,IAAI,EAAE,CAAC,YAAY,CAAC,EAAC,CAAC;IACpC,mBAAmB,CAAC,UAAU,CAAC;IAC/B,GAAG,CAAC,aAAa,CAAC;IAClB,aAAa,CAAC,EAAC,IAAI,EAAE,CAAC,YAAY,CAAC,EAAC,CAAC;;;;4DAsBrC;AAQK;IANL,SAAS,CAAC,gBAAgB,EAAE,wBAAwB,CAAC;IACrD,aAAa,EAAE;IACf,YAAY,CAAC,EAAC,IAAI,EAAE,CAAC,YAAY,CAAC,EAAC,CAAC;IACpC,mBAAmB,CAAC,UAAU,CAAC;IAC/B,GAAG,CAAC,gBAAgB,CAAC;IACrB,aAAa,CAAC,EAAC,IAAI,EAAE,CAAC,YAAY,CAAC,EAAC,CAAC;;;;kEAerC;AA/DQ,uBAAuB;IAFnC,UAAU,CAAC,iBAAiB,CAAC;IAC7B,OAAO,CAAC,UAAU,CAAC;IAIX,WAAA,WAAW,CAAC,eAAe,CAAC,CAAA;qCADU,oBAAoB;QAE5C,KAAK;GAJf,uBAAuB,CAgEnC"}
|
|
@@ -8,6 +8,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
10
|
var AuthenticatedStripeCheckoutService_1;
|
|
11
|
+
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
11
12
|
import { ForbiddenException, Injectable, Logger } from "@nestjs/common";
|
|
12
13
|
import { OrganisationSubscriptionService } from "../../organisation-subscriptions/organisation-subscriptions.service.js";
|
|
13
14
|
import { StripeCheckoutService } from "./stripe-checkout.service.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-stripe-checkout.service.js","sourceRoot":"","sources":["../../../src/stripe-client/services/auth-stripe-checkout.service.ts"],"names":[],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"auth-stripe-checkout.service.js","sourceRoot":"","sources":["../../../src/stripe-client/services/auth-stripe-checkout.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qDAAqD;AACrD,OAAO,EAAC,kBAAkB,EAAE,UAAU,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAMtE,OAAO,EAAC,+BAA+B,EAAC,MAAM,wEAAwE,CAAC;AACvH,OAAO,EAAC,qBAAqB,EAAC,MAAM,8BAA8B,CAAC;AAG5D,IAAM,kCAAkC,0CAAxC,MAAM,kCAAkC;IAKtB;IACA;IALJ,MAAM,GAAG,IAAI,MAAM,CAChC,oCAAkC,CAAC,IAAI,CAC1C,CAAC;IACF,YACqB,+BAAgE,EAChE,qBAA4C;QAD5C,oCAA+B,GAA/B,+BAA+B,CAAiC;QAChE,0BAAqB,GAArB,qBAAqB,CAAuB;IAC9D,CAAC;IAEJ,wEAAwE;IACjE,KAAK,CAAC,2BAA2B,CACpC,UAA0C,EAC1C,IAAiB;QAEjB,wEAAwE;QACxE,MAAM,kBAAkB,GACpB,MAAM,IAAI,CAAC,+BAA+B,CAAC,OAAO,CAC9C,UAAU,CAAC,sBAAsB,CACpC,CAAC;QACN,IACI,CAAC,IAAI,CAAC,WAAW;YACb,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CA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B,CACxB,4CAA4C,CAC/C,CAAC;QACN,CAAC;QAED,OAAO,IAAI,CAAC,qBAAqB,CAAC,qBAAqB,CACnD,UAAU,EACV,IAAI,CACP,CAAC;IACN,CAAC;CACJ,CAAA;AAzEY,kCAAkC;IAD9C,UAAU,EAAE;qCAM6C,+BAA+B;QACzC,qBAAqB;GANxD,kCAAkC,CAyE9C"}
|
|
@@ -5,6 +5,7 @@ import { StripeCheckoutEvent } from "../entities/stripe-checkout-event.entity.js
|
|
|
5
5
|
import { Repository } from "typeorm";
|
|
6
6
|
import { OrganisationSubscriptionService } from "../../organisation-subscriptions/organisation-subscriptions.service.js";
|
|
7
7
|
import SubscriptionRecordMapper from "./subscriptionRecord.mapper.js";
|
|
8
|
+
/** @deprecated Use StripePaymentsModule, which provides durable event inboxing and replay. */
|
|
8
9
|
export declare class StripeQueuedEventHandler extends WorkerHost {
|
|
9
10
|
private readonly stripe;
|
|
10
11
|
private readonly stripeCheckoutEventRepository;
|
|
@@ -11,6 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
var StripeQueuedEventHandler_1;
|
|
14
|
+
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
14
15
|
import { Inject, Injectable, Logger } from "@nestjs/common";
|
|
15
16
|
import { OnWorkerEvent, WorkerHost, Processor } from "@nestjs/bullmq";
|
|
16
17
|
import { Job } from "bullmq";
|
|
@@ -20,6 +21,7 @@ import { StripeCheckoutEvent } from "../entities/stripe-checkout-event.entity.js
|
|
|
20
21
|
import { Repository } from "typeorm";
|
|
21
22
|
import { OrganisationSubscriptionService } from "../../organisation-subscriptions/organisation-subscriptions.service.js";
|
|
22
23
|
import SubscriptionRecordMapper from "./subscriptionRecord.mapper.js";
|
|
24
|
+
/** @deprecated Use StripePaymentsModule, which provides durable event inboxing and replay. */
|
|
23
25
|
let StripeQueuedEventHandler = StripeQueuedEventHandler_1 = class StripeQueuedEventHandler extends WorkerHost {
|
|
24
26
|
stripe;
|
|
25
27
|
stripeCheckoutEventRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queued-payment-event.handler.js","sourceRoot":"","sources":["../../../src/stripe-client/services/queued-payment-event.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAC,GAAG,EAAC,MAAM,QAAQ,CAAC;AAC3B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AACnC,OAAO,EAAC,+BAA+B,EAAC,MAAM,wEAAwE,CAAC;AACvH,OAAO,wBAAwB,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"queued-payment-event.handler.js","sourceRoot":"","sources":["../../../src/stripe-client/services/queued-payment-event.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qDAAqD;AACrD,OAAO,EAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAC,GAAG,EAAC,MAAM,QAAQ,CAAC;AAC3B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AAC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AGD;IADC,aAAa,CAAC,QAAQ,CAAC;;qCACV,GAAG;;wDAIhB;AAGD;IADC,aAAa,CAAC,WAAW,CAAC;;qCACX,GAAG;;0DAIlB;AAlCQ,wBAAwB;IAPpC,UAAU,EAAE;IACZ,SAAS,CAAC,eAAe,CAAC;IAC3B,+EAA+E;IAC/E,2BAA2B;IAC3B,sFAAsF;IACtF,yEAAyE;IACzE,yDAAyD;;IAIhD,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;IAEtB,WAAA,gBAAgB,CAAC,mBAAmB,CAAC,CAAA;qCADb,MAAM;QAEiB,UAAU;QACR,+BAA+B;QAC/C,wBAAwB;GARrD,wBAAwB,CAsPpC"}
|
|
@@ -7,6 +7,7 @@ import { StripeCheckoutEvent } from "../entities/stripe-checkout-event.entity.js
|
|
|
7
7
|
import { Repository } from "typeorm";
|
|
8
8
|
import { StripeCustomerPortalResponseDto } from "../models/StripeCustomerPortalResponseDto.js";
|
|
9
9
|
import { RequestUser } from "../../authorization/models/RequestWithUser.js";
|
|
10
|
+
/** @deprecated Use SecureStripeCheckoutService through StripePaymentsModule. */
|
|
10
11
|
export declare class StripeCheckoutService {
|
|
11
12
|
private readonly clientInstance;
|
|
12
13
|
private readonly stripeClientConfigurationService;
|
|
@@ -11,6 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
var StripeCheckoutService_1;
|
|
14
|
+
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
14
15
|
import { Inject, Injectable, Logger } from "@nestjs/common";
|
|
15
16
|
import Stripe from "stripe";
|
|
16
17
|
import { StripeClientConfigurationService } from "../StripeClientConfigurationService.js";
|
|
@@ -18,6 +19,7 @@ import { PaymentSessionService } from "../../payment-sessions/payment-session.se
|
|
|
18
19
|
import { InjectRepository } from "@nestjs/typeorm";
|
|
19
20
|
import { StripeCheckoutEvent } from "../entities/stripe-checkout-event.entity.js";
|
|
20
21
|
import { Repository } from "typeorm";
|
|
22
|
+
/** @deprecated Use SecureStripeCheckoutService through StripePaymentsModule. */
|
|
21
23
|
let StripeCheckoutService = StripeCheckoutService_1 = class StripeCheckoutService {
|
|
22
24
|
clientInstance;
|
|
23
25
|
stripeClientConfigurationService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe-checkout.service.js","sourceRoot":"","sources":["../../../src/stripe-client/services/stripe-checkout.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAC1D,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAC,gCAAgC,EAAC,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAC,qBAAqB,EAAC,MAAM,mDAAmD,CAAC;AACxF,OAAO,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"stripe-checkout.service.js","sourceRoot":"","sources":["../../../src/stripe-client/services/stripe-checkout.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qDAAqD;AACrD,OAAO,EAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAC1D,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAC,gCAAgC,EAAC,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAC,qBAAqB,EAAC,MAAM,mDAAmD,CAAC;AACxF,OAAO,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AAInC,gFAAgF;AAEzE,IAA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B,CAAC,CAAC;YACH,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACzD,CAAC;QAED,OAAO,EAAC,gBAAgB,EAAE,OAAO,CAAC,GAAG,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,EAAC,CAAC;IACxE,CAAC;IAEM,KAAK,CAAC,yBAAyB,CAClC,uBAA+B,EAC/B,SAAiB;QAEjB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,CACnE;YACI,QAAQ,EAAE,uBAAuB;YACjC,UAAU,EAAE,GAAG,IAAI,CAAC,gCAAgC,CAAC,sBAAsB,GAAG,SAAS,EAAE;SAC5F,CACJ,CAAC;QAEF,OAAO,EAAC,UAAU,EAAE,OAAO,CAAC,GAAG,EAAC,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,OAAO,CAChB,IAAY,EACZ,IAAY;QAEZ,OAAO,IAAI,CAAC,6BAA6B,CAAC,IAAI,CAAC;YAC3C,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,IAAI;YACV,KAAK,EAAE;gBACH,WAAW,EAAE,MAAM;aACtB;SACJ,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AAzEY,qBAAqB;IADjC,UAAU,EAAE;IAIJ,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;IAItB,WAAA,gBAAgB,CAAC,mBAAmB,CAAC,CAAA;qCAHL,MAAM;QACY,gCAAgC;QAC3C,qBAAqB;QAEb,UAAU;GARrD,qBAAqB,CAyEjC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DynamicModule } from "@nestjs/common";
|
|
2
2
|
import "reflect-metadata";
|
|
3
3
|
import { StripeModuleAsyncOptions } from "./stripe-account.options.js";
|
|
4
|
+
/** @deprecated Use StripePaymentsModule from `stripe-payments` for new applications. */
|
|
4
5
|
export declare class StripeAccountModule {
|
|
5
6
|
static forRoot(): never;
|
|
6
7
|
static forRootAsync(options: StripeModuleAsyncOptions): DynamicModule;
|
|
@@ -5,6 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
var StripeAccountModule_1;
|
|
8
|
+
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
8
9
|
import { Module } from "@nestjs/common";
|
|
9
10
|
import "reflect-metadata";
|
|
10
11
|
import { StripeClientConfigurationService } from "./StripeClientConfigurationService.js";
|
|
@@ -22,6 +23,7 @@ import { StripeEventsController } from "./controllers/stripe-events-controller.j
|
|
|
22
23
|
import { AuthenticatedStripeCheckoutService } from "./services/auth-stripe-checkout.service.js";
|
|
23
24
|
import SubscriptionRecordMapper from "./services/subscriptionRecord.mapper.js";
|
|
24
25
|
import { STRIPE_MODULE_OPTIONS, } from "./stripe-account.options.js";
|
|
26
|
+
/** @deprecated Use StripePaymentsModule from `stripe-payments` for new applications. */
|
|
25
27
|
let StripeAccountModule = StripeAccountModule_1 = class StripeAccountModule {
|
|
26
28
|
static forRoot() {
|
|
27
29
|
throw new Error("StripeAccountModule.forRoot() is not supported. Use forRootAsync() instead.");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe-account.module.js","sourceRoot":"","sources":["../../src/stripe-client/stripe-account.module.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAgB,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACrD,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAC,gCAAgC,EAAC,MAAM,uCAAuC,CAAC;AACvF,OAAO,EAAC,qBAAqB,EAAC,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,mBAAmB,EAAC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AmB;IAD/B,MAAM,CAAC,EAAE,CAAC;GACE,mBAAmB,CAiD/B"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { ModuleMetadata } from "@nestjs/common";
|
|
2
2
|
export declare const STRIPE_MODULE_OPTIONS: unique symbol;
|
|
3
|
+
/** @deprecated Use StripePaymentsModuleOptions. */
|
|
3
4
|
export interface StripeModuleOptions {
|
|
4
5
|
accessToken: string;
|
|
5
6
|
webhookVerificationKey: string;
|
|
6
7
|
stripeRedirectsBaseUrl: string;
|
|
7
8
|
}
|
|
9
|
+
/** @deprecated Use StripePaymentsModuleAsyncOptions. */
|
|
8
10
|
export interface StripeModuleAsyncOptions extends Pick<ModuleMetadata, "imports"> {
|
|
9
11
|
useFactory: (...arguments_: any[]) => Promise<StripeModuleOptions> | StripeModuleOptions;
|
|
10
12
|
inject?: any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe-account.options.js","sourceRoot":"","sources":["../../src/stripe-client/stripe-account.options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stripe-account.options.js","sourceRoot":"","sources":["../../src/stripe-client/stripe-account.options.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RequestWithUser } from "../../authorization/models/RequestWithUser.js";
|
|
2
|
+
import { SecureStripeCheckoutService } from "../services/secure-stripe-checkout.service.js";
|
|
3
|
+
import { StripeCheckoutSessionRequestDto, StripeCustomerPortalRequestDto } from "../models/secure-checkout.dto.js";
|
|
4
|
+
import { StripeCheckoutSessionResponseDto, StripeCustomerPortalResponseDto } from "../models/secure-payment-response.dto.js";
|
|
5
|
+
export declare class SecureStripeCheckoutController {
|
|
6
|
+
private readonly checkoutService;
|
|
7
|
+
constructor(checkoutService: SecureStripeCheckoutService);
|
|
8
|
+
createCheckoutSession(request: RequestWithUser, idempotencyKey: string | undefined, body: StripeCheckoutSessionRequestDto): Promise<StripeCheckoutSessionResponseDto>;
|
|
9
|
+
createCustomerPortalSession(request: RequestWithUser, idempotencyKey: string | undefined, body: StripeCustomerPortalRequestDto): Promise<StripeCustomerPortalResponseDto>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { Body, Controller, Headers, Post, Request, UseGuards, } from "@nestjs/common";
|
|
14
|
+
import { ApiBearerAuth, ApiHeader, ApiOkResponse, ApiTags, } from "@nestjs/swagger";
|
|
15
|
+
import { DefaultAuthGuard } from "../../authorization/guards/DefaultAuthGuard.js";
|
|
16
|
+
import { SecureStripeCheckoutService } from "../services/secure-stripe-checkout.service.js";
|
|
17
|
+
import { StripeCheckoutSessionRequestDto, StripeCustomerPortalRequestDto, } from "../models/secure-checkout.dto.js";
|
|
18
|
+
import { StripeCheckoutSessionResponseDto, StripeCustomerPortalResponseDto, } from "../models/secure-payment-response.dto.js";
|
|
19
|
+
let SecureStripeCheckoutController = class SecureStripeCheckoutController {
|
|
20
|
+
checkoutService;
|
|
21
|
+
constructor(checkoutService) {
|
|
22
|
+
this.checkoutService = checkoutService;
|
|
23
|
+
}
|
|
24
|
+
createCheckoutSession(request, idempotencyKey, body) {
|
|
25
|
+
return this.checkoutService.createCheckoutSession(body, request.user, idempotencyKey);
|
|
26
|
+
}
|
|
27
|
+
createCustomerPortalSession(request, idempotencyKey, body) {
|
|
28
|
+
return this.checkoutService.createCustomerPortalSession(body, request.user, idempotencyKey);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
__decorate([
|
|
32
|
+
Post("checkout-session"),
|
|
33
|
+
UseGuards(DefaultAuthGuard),
|
|
34
|
+
ApiHeader({ name: "Idempotency-Key", required: true }),
|
|
35
|
+
ApiOkResponse({ type: StripeCheckoutSessionResponseDto }),
|
|
36
|
+
__param(0, Request()),
|
|
37
|
+
__param(1, Headers("idempotency-key")),
|
|
38
|
+
__param(2, Body()),
|
|
39
|
+
__metadata("design:type", Function),
|
|
40
|
+
__metadata("design:paramtypes", [Object, Object, StripeCheckoutSessionRequestDto]),
|
|
41
|
+
__metadata("design:returntype", Promise)
|
|
42
|
+
], SecureStripeCheckoutController.prototype, "createCheckoutSession", null);
|
|
43
|
+
__decorate([
|
|
44
|
+
Post("customer-portal-session"),
|
|
45
|
+
UseGuards(DefaultAuthGuard),
|
|
46
|
+
ApiHeader({ name: "Idempotency-Key", required: true }),
|
|
47
|
+
ApiOkResponse({
|
|
48
|
+
type: StripeCustomerPortalResponseDto,
|
|
49
|
+
description: "The URL to the customer portal",
|
|
50
|
+
}),
|
|
51
|
+
__param(0, Request()),
|
|
52
|
+
__param(1, Headers("idempotency-key")),
|
|
53
|
+
__param(2, Body()),
|
|
54
|
+
__metadata("design:type", Function),
|
|
55
|
+
__metadata("design:paramtypes", [Object, Object, StripeCustomerPortalRequestDto]),
|
|
56
|
+
__metadata("design:returntype", Promise)
|
|
57
|
+
], SecureStripeCheckoutController.prototype, "createCustomerPortalSession", null);
|
|
58
|
+
SecureStripeCheckoutController = __decorate([
|
|
59
|
+
Controller("payments/stripe"),
|
|
60
|
+
ApiTags("Payments"),
|
|
61
|
+
ApiBearerAuth(),
|
|
62
|
+
__metadata("design:paramtypes", [SecureStripeCheckoutService])
|
|
63
|
+
], SecureStripeCheckoutController);
|
|
64
|
+
export { SecureStripeCheckoutController };
|
|
65
|
+
//# sourceMappingURL=secure-stripe-checkout.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secure-stripe-checkout.controller.js","sourceRoot":"","sources":["../../../src/stripe-payments/controllers/secure-stripe-checkout.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACH,IAAI,EACJ,UAAU,EACV,OAAO,EACP,IAAI,EACJ,OAAO,EACP,SAAS,GACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACH,aAAa,EACb,SAAS,EACT,aAAa,EACb,OAAO,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,gBAAgB,EAAC,MAAM,gDAAgD,CAAC;AAEhF,OAAO,EAAC,2BAA2B,EAAC,MAAM,+CAA+C,CAAC;AAC1F,OAAO,EACH,+BAA+B,EAC/B,8BAA8B,GACjC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACH,gCAAgC,EAChC,+BAA+B,GAClC,MAAM,0CAA0C,CAAC;AAK3C,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAElB;IADrB,YACqB,eAA4C;QAA5C,oBAAe,GAAf,eAAe,CAA6B;IAC9D,CAAC;IAMJ,qBAAqB,CACN,OAAwB,EACP,cAAkC,EACtD,IAAqC;QAE7C,OAAO,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAC7C,IAAI,EACJ,OAAO,CAAC,IAAI,EACZ,cAAc,CACjB,CAAC;IACN,CAAC;IASD,2BAA2B,CACZ,OAAwB,EACP,cAAkC,EACtD,IAAoC;QAE5C,OAAO,IAAI,CAAC,eAAe,CAAC,2BAA2B,CACnD,IAAI,EACJ,OAAO,CAAC,IAAI,EACZ,cAAc,CACjB,CAAC;IACN,CAAC;CACJ,CAAA;AA9BG;IAJC,IAAI,CAAC,kBAAkB,CAAC;IACxB,SAAS,CAAC,gBAAgB,CAAC;IAC3B,SAAS,CAAC,EAAC,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;IACpD,aAAa,CAAC,EAAC,IAAI,EAAE,gCAAgC,EAAC,CAAC;IAEnD,WAAA,OAAO,EAAE,CAAA;IACT,WAAA,OAAO,CAAC,iBAAiB,CAAC,CAAA;IAC1B,WAAA,IAAI,EAAE,CAAA;;qDAAO,+BAA+B;;2EAOhD;AASD;IAPC,IAAI,CAAC,yBAAyB,CAAC;IAC/B,SAAS,CAAC,gBAAgB,CAAC;IAC3B,SAAS,CAAC,EAAC,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;IACpD,aAAa,CAAC;QACX,IAAI,EAAE,+BAA+B;QACrC,WAAW,EAAE,gCAAgC;KAChD,CAAC;IAEG,WAAA,OAAO,EAAE,CAAA;IACT,WAAA,OAAO,CAAC,iBAAiB,CAAC,CAAA;IAC1B,WAAA,IAAI,EAAE,CAAA;;qDAAO,8BAA8B;;iFAO/C;AAtCQ,8BAA8B;IAH1C,UAAU,CAAC,iBAAiB,CAAC;IAC7B,OAAO,CAAC,UAAU,CAAC;IACnB,aAAa,EAAE;qCAG0B,2BAA2B;GAFxD,8BAA8B,CAuC1C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StripeCheckoutEvent } from "../entities/stripe-payment-event.entity.js";
|
|
2
|
+
import { StripePaymentEventService } from "../services/stripe-payment-event.service.js";
|
|
3
|
+
import { StripeEventsQueryDto } from "../models/secure-checkout.dto.js";
|
|
4
|
+
export declare class SecureStripeEventsController {
|
|
5
|
+
private readonly eventService;
|
|
6
|
+
constructor(eventService: StripePaymentEventService);
|
|
7
|
+
getEvents(query: StripeEventsQueryDto): Promise<StripeCheckoutEvent[]>;
|
|
8
|
+
replay(eventId: string): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { BadRequestException, Controller, Get, Param, Post, Query, UseGuards, } from "@nestjs/common";
|
|
14
|
+
import { ApiBearerAuth, ApiOkResponse, ApiOperation, ApiTags, } from "@nestjs/swagger";
|
|
15
|
+
import { ClaimsAuthorisationGuard } from "../../authorization/guards/ClaimsAuthorisationGuard.js";
|
|
16
|
+
import { DefaultAuthGuard } from "../../authorization/guards/DefaultAuthGuard.js";
|
|
17
|
+
import { MandatoryUserClaims } from "../../authorization/guards/MandatoryUserClaims.decorator.js";
|
|
18
|
+
import { StripeCheckoutEvent } from "../entities/stripe-payment-event.entity.js";
|
|
19
|
+
import { StripePaymentEventService } from "../services/stripe-payment-event.service.js";
|
|
20
|
+
import { StripeEventsQueryDto } from "../models/secure-checkout.dto.js";
|
|
21
|
+
let SecureStripeEventsController = class SecureStripeEventsController {
|
|
22
|
+
eventService;
|
|
23
|
+
constructor(eventService) {
|
|
24
|
+
this.eventService = eventService;
|
|
25
|
+
}
|
|
26
|
+
getEvents(query) {
|
|
27
|
+
return this.eventService.list(query.take, query.skip);
|
|
28
|
+
}
|
|
29
|
+
replay(eventId) {
|
|
30
|
+
if (!/^evt_[A-Za-z0-9]+$/.test(eventId)) {
|
|
31
|
+
throw new BadRequestException("Invalid Stripe event ID");
|
|
32
|
+
}
|
|
33
|
+
return this.eventService.replay(eventId);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
__decorate([
|
|
37
|
+
Get(),
|
|
38
|
+
MandatoryUserClaims("read:all"),
|
|
39
|
+
ApiOperation({ tags: ["SuperPower"] }),
|
|
40
|
+
ApiOkResponse({ type: [StripeCheckoutEvent] }),
|
|
41
|
+
__param(0, Query()),
|
|
42
|
+
__metadata("design:type", Function),
|
|
43
|
+
__metadata("design:paramtypes", [StripeEventsQueryDto]),
|
|
44
|
+
__metadata("design:returntype", Promise)
|
|
45
|
+
], SecureStripeEventsController.prototype, "getEvents", null);
|
|
46
|
+
__decorate([
|
|
47
|
+
Post(":eventId/replay"),
|
|
48
|
+
UseGuards(DefaultAuthGuard, ClaimsAuthorisationGuard),
|
|
49
|
+
MandatoryUserClaims("read:all"),
|
|
50
|
+
ApiOperation({ tags: ["SuperPower"] }),
|
|
51
|
+
ApiOkResponse({ type: Object }),
|
|
52
|
+
__param(0, Param("eventId")),
|
|
53
|
+
__metadata("design:type", Function),
|
|
54
|
+
__metadata("design:paramtypes", [String]),
|
|
55
|
+
__metadata("design:returntype", Promise)
|
|
56
|
+
], SecureStripeEventsController.prototype, "replay", null);
|
|
57
|
+
SecureStripeEventsController = __decorate([
|
|
58
|
+
Controller("payments/stripe/events"),
|
|
59
|
+
ApiTags("Payments"),
|
|
60
|
+
ApiBearerAuth(),
|
|
61
|
+
UseGuards(DefaultAuthGuard, ClaimsAuthorisationGuard),
|
|
62
|
+
__metadata("design:paramtypes", [StripePaymentEventService])
|
|
63
|
+
], SecureStripeEventsController);
|
|
64
|
+
export { SecureStripeEventsController };
|
|
65
|
+
//# sourceMappingURL=secure-stripe-events.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secure-stripe-events.controller.js","sourceRoot":"","sources":["../../../src/stripe-payments/controllers/secure-stripe-events.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACH,mBAAmB,EACnB,UAAU,EACV,GAAG,EACH,KAAK,EACL,IAAI,EACJ,KAAK,EACL,SAAS,GACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACH,aAAa,EACb,aAAa,EACb,YAAY,EACZ,OAAO,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,wBAAwB,EAAC,MAAM,wDAAwD,CAAC;AAChG,OAAO,EAAC,gBAAgB,EAAC,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAC,mBAAmB,EAAC,MAAM,6DAA6D,CAAC;AAChG,OAAO,EAAC,mBAAmB,EAAC,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAC,yBAAyB,EAAC,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAC,oBAAoB,EAAC,MAAM,kCAAkC,CAAC;AAM/D,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACR;IAA7B,YAA6B,YAAuC;QAAvC,iBAAY,GAAZ,YAAY,CAA2B;IAAG,CAAC;IAMxE,SAAS,CACI,KAA2B;QAEpC,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;IAOD,MAAM,CAAmB,OAAe;QACpC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YACtC,MAAM,IAAI,mBAAmB,CAAC,yBAAyB,CAAC,CAAC;QAC7D,CAAC;QACD,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;CACJ,CAAA;AAjBG;IAJC,GAAG,EAAE;IACL,mBAAmB,CAAC,UAAU,CAAC;IAC/B,YAAY,CAAC,EAAC,IAAI,EAAE,CAAC,YAAY,CAAC,EAAC,CAAC;IACpC,aAAa,CAAC,EAAC,IAAI,EAAE,CAAC,mBAAmB,CAAC,EAAC,CAAC;IAExC,WAAA,KAAK,EAAE,CAAA;;qCAAQ,oBAAoB;;6DAGvC;AAOD;IALC,IAAI,CAAC,iBAAiB,CAAC;IACvB,SAAS,CAAC,gBAAgB,EAAE,wBAAwB,CAAC;IACrD,mBAAmB,CAAC,UAAU,CAAC;IAC/B,YAAY,CAAC,EAAC,IAAI,EAAE,CAAC,YAAY,CAAC,EAAC,CAAC;IACpC,aAAa,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;IACtB,WAAA,KAAK,CAAC,SAAS,CAAC,CAAA;;;;0DAKvB;AAvBQ,4BAA4B;IAJxC,UAAU,CAAC,wBAAwB,CAAC;IACpC,OAAO,CAAC,UAAU,CAAC;IACnB,aAAa,EAAE;IACf,SAAS,CAAC,gBAAgB,EAAE,wBAAwB,CAAC;qCAEP,yBAAyB;GAD3D,4BAA4B,CAwBxC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Queue } from "bullmq";
|
|
2
|
+
import { RawStripeWebhookRequest, SecureStripeWebhookService } from "../services/secure-stripe-webhook.service.js";
|
|
3
|
+
import { StripePaymentsOperationsService, StripePaymentsOperationsSnapshot } from "../services/stripe-payments-operations.service.js";
|
|
4
|
+
export declare class SecureStripeWebhookController {
|
|
5
|
+
private readonly webhookService;
|
|
6
|
+
private readonly eventQueue;
|
|
7
|
+
private readonly operationsService;
|
|
8
|
+
constructor(webhookService: SecureStripeWebhookService, eventQueue: Queue, operationsService: StripePaymentsOperationsService);
|
|
9
|
+
receiveWebhook(request: RawStripeWebhookRequest): Promise<void>;
|
|
10
|
+
getQueueJobs(): Promise<unknown[]>;
|
|
11
|
+
getFailedQueueJobs(): Promise<unknown[]>;
|
|
12
|
+
getOperations(): Promise<StripePaymentsOperationsSnapshot>;
|
|
13
|
+
private getJobs;
|
|
14
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { Controller, Get, Post, Req, UseGuards } from "@nestjs/common";
|
|
14
|
+
import { ApiBadRequestResponse, ApiOkResponse, ApiOperation, ApiTags, } from "@nestjs/swagger";
|
|
15
|
+
import { ClaimsAuthorisationGuard } from "../../authorization/guards/ClaimsAuthorisationGuard.js";
|
|
16
|
+
import { DefaultAuthGuard } from "../../authorization/guards/DefaultAuthGuard.js";
|
|
17
|
+
import { MandatoryUserClaims } from "../../authorization/guards/MandatoryUserClaims.decorator.js";
|
|
18
|
+
import { InjectQueue } from "@nestjs/bullmq";
|
|
19
|
+
import { Queue } from "bullmq";
|
|
20
|
+
import { SecureStripeWebhookService, } from "../services/secure-stripe-webhook.service.js";
|
|
21
|
+
import { StripePaymentsOperationsService, } from "../services/stripe-payments-operations.service.js";
|
|
22
|
+
let SecureStripeWebhookController = class SecureStripeWebhookController {
|
|
23
|
+
webhookService;
|
|
24
|
+
eventQueue;
|
|
25
|
+
operationsService;
|
|
26
|
+
constructor(webhookService, eventQueue, operationsService) {
|
|
27
|
+
this.webhookService = webhookService;
|
|
28
|
+
this.eventQueue = eventQueue;
|
|
29
|
+
this.operationsService = operationsService;
|
|
30
|
+
}
|
|
31
|
+
receiveWebhook(request) {
|
|
32
|
+
return this.webhookService.handleWebhook(request);
|
|
33
|
+
}
|
|
34
|
+
getQueueJobs() {
|
|
35
|
+
return this.getJobs([
|
|
36
|
+
"waiting",
|
|
37
|
+
"active",
|
|
38
|
+
"delayed",
|
|
39
|
+
"completed",
|
|
40
|
+
"failed",
|
|
41
|
+
"paused",
|
|
42
|
+
]);
|
|
43
|
+
}
|
|
44
|
+
getFailedQueueJobs() {
|
|
45
|
+
return this.getJobs(["delayed", "failed"]);
|
|
46
|
+
}
|
|
47
|
+
getOperations() {
|
|
48
|
+
return this.operationsService.getSnapshot();
|
|
49
|
+
}
|
|
50
|
+
async getJobs(states) {
|
|
51
|
+
const jobs = await this.eventQueue.getJobs(states);
|
|
52
|
+
return jobs.map((job) => ({
|
|
53
|
+
id: job.id ?? "unknown",
|
|
54
|
+
state: job.finishedOn
|
|
55
|
+
? "completed"
|
|
56
|
+
: job.failedReason
|
|
57
|
+
? "failed"
|
|
58
|
+
: "pending",
|
|
59
|
+
eventId: job.data.id ?? "unknown",
|
|
60
|
+
failedReason: job.failedReason,
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
__decorate([
|
|
65
|
+
Post("webhook-receiver"),
|
|
66
|
+
ApiOkResponse({ type: Object }),
|
|
67
|
+
ApiBadRequestResponse(),
|
|
68
|
+
__param(0, Req()),
|
|
69
|
+
__metadata("design:type", Function),
|
|
70
|
+
__metadata("design:paramtypes", [Object]),
|
|
71
|
+
__metadata("design:returntype", Promise)
|
|
72
|
+
], SecureStripeWebhookController.prototype, "receiveWebhook", null);
|
|
73
|
+
__decorate([
|
|
74
|
+
Get("peekalljobs"),
|
|
75
|
+
UseGuards(DefaultAuthGuard, ClaimsAuthorisationGuard),
|
|
76
|
+
MandatoryUserClaims("read:all"),
|
|
77
|
+
ApiOperation({ tags: ["SuperPower"] }),
|
|
78
|
+
ApiOkResponse({ type: [Object] }),
|
|
79
|
+
__metadata("design:type", Function),
|
|
80
|
+
__metadata("design:paramtypes", []),
|
|
81
|
+
__metadata("design:returntype", Promise)
|
|
82
|
+
], SecureStripeWebhookController.prototype, "getQueueJobs", null);
|
|
83
|
+
__decorate([
|
|
84
|
+
Get("peekfailedjobs"),
|
|
85
|
+
UseGuards(DefaultAuthGuard, ClaimsAuthorisationGuard),
|
|
86
|
+
MandatoryUserClaims("read:all"),
|
|
87
|
+
ApiOperation({ tags: ["SuperPower"] }),
|
|
88
|
+
ApiOkResponse({ type: [Object] }),
|
|
89
|
+
__metadata("design:type", Function),
|
|
90
|
+
__metadata("design:paramtypes", []),
|
|
91
|
+
__metadata("design:returntype", Promise)
|
|
92
|
+
], SecureStripeWebhookController.prototype, "getFailedQueueJobs", null);
|
|
93
|
+
__decorate([
|
|
94
|
+
Get("operations"),
|
|
95
|
+
UseGuards(DefaultAuthGuard, ClaimsAuthorisationGuard),
|
|
96
|
+
MandatoryUserClaims("read:all"),
|
|
97
|
+
ApiOperation({ tags: ["SuperPower"] }),
|
|
98
|
+
ApiOkResponse({ type: Object }),
|
|
99
|
+
__metadata("design:type", Function),
|
|
100
|
+
__metadata("design:paramtypes", []),
|
|
101
|
+
__metadata("design:returntype", Promise)
|
|
102
|
+
], SecureStripeWebhookController.prototype, "getOperations", null);
|
|
103
|
+
SecureStripeWebhookController = __decorate([
|
|
104
|
+
Controller("payments/stripe"),
|
|
105
|
+
ApiTags("Payments"),
|
|
106
|
+
__param(1, InjectQueue("stripe-events")),
|
|
107
|
+
__metadata("design:paramtypes", [SecureStripeWebhookService,
|
|
108
|
+
Queue,
|
|
109
|
+
StripePaymentsOperationsService])
|
|
110
|
+
], SecureStripeWebhookController);
|
|
111
|
+
export { SecureStripeWebhookController };
|
|
112
|
+
//# sourceMappingURL=secure-stripe-webhook.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secure-stripe-webhook.controller.js","sourceRoot":"","sources":["../../../src/stripe-payments/controllers/secure-stripe-webhook.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACrE,OAAO,EACH,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,OAAO,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,wBAAwB,EAAC,MAAM,wDAAwD,CAAC;AAChG,OAAO,EAAC,gBAAgB,EAAC,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAC,mBAAmB,EAAC,MAAM,6DAA6D,CAAC;AAChG,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAM,KAAK,EAAC,MAAM,QAAQ,CAAC;AAClC,OAAO,EAEH,0BAA0B,GAC7B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACH,+BAA+B,GAElC,MAAM,mDAAmD,CAAC;AAIpD,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAEjB;IAC8B;IAC9B;IAHrB,YACqB,cAA0C,EACZ,UAAiB,EAC/C,iBAAkD;QAFlD,mBAAc,GAAd,cAAc,CAA4B;QACZ,eAAU,GAAV,UAAU,CAAO;QAC/C,sBAAiB,GAAjB,iBAAiB,CAAiC;IACpE,CAAC;IAKJ,cAAc,CAAQ,OAAgC;QAClD,OAAO,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC;IAOD,YAAY;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;YAChB,SAAS;YACT,QAAQ;YACR,SAAS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,CAAC;IACrB,SAAS,CAAC,gBAAgB,EAAE,wBAAwB,CAAC;IACrD,mBAAmB,CAAC,UAAU,CAAC;IAC/B,YAAY,CAAC,EAAC,IAAI,EAAE,CAAC,YAAY,CAAC,EAAC,CAAC;IACpC,aAAa,CAAC,EAAC,IAAI,EAAE,CAAC,MAAM,CAAC,EAAC,CAAC;;;;uEAG/B;AAOD;IALC,GAAG,CAAC,YAAY,CAAC;IACjB,SAAS,CAAC,gBAAgB,EAAE,wBAAwB,CAAC;IACrD,mBAAmB,CAAC,UAAU,CAAC;IAC/B,YAAY,CAAC,EAAC,IAAI,EAAE,CAAC,YAAY,CAAC,EAAC,CAAC;IACpC,aAAa,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;;;;kEAG7B;AA9CQ,6BAA6B;IAFzC,UAAU,CAAC,iBAAiB,CAAC;IAC7B,OAAO,CAAC,UAAU,CAAC;IAIX,WAAA,WAAW,CAAC,eAAe,CAAC,CAAA;qCADI,0BAA0B;QACA,KAAK;QAC5B,+BAA+B;GAJ9D,6BAA6B,CA+DzC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class StripeCheckoutAttempt {
|
|
2
|
+
id: number;
|
|
3
|
+
idempotencyKey: string;
|
|
4
|
+
organisationUuid: string;
|
|
5
|
+
userUuid: string;
|
|
6
|
+
productKey: string;
|
|
7
|
+
priceId: string;
|
|
8
|
+
mode: string;
|
|
9
|
+
status: "creating" | "created" | "failed";
|
|
10
|
+
stripeSessionId?: string;
|
|
11
|
+
stripeSessionUrl?: string;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
createdDate: Date;
|
|
14
|
+
updatedDate: Date;
|
|
15
|
+
}
|