@saasicat/nest 1.0.0-rc.2 → 1.0.0-rc.21
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 +44 -8
- package/dist/.build-stamp +1 -1
- package/dist/_entries.cjs +10214 -4796
- package/dist/admin/index.d.cts +5 -4
- package/dist/admin/index.d.ts +5 -4
- package/dist/admin/index.js +13 -9
- package/dist/{admin-resources.module-CpvzcfCc.d.cts → admin-resources.module-B4XNvdH-.d.cts} +1 -2
- package/dist/{admin-resources.module-DF5_Q7RD.d.ts → admin-resources.module-CWqdI9BV.d.ts} +1 -2
- package/dist/{admin-stats.service-TYiSUwIR.d.ts → admin-stats.service-CsLNt19Z.d.ts} +11 -7
- package/dist/{admin-stats.service-DfKupywR.d.cts → admin-stats.service-DrZrU8IJ.d.cts} +11 -7
- package/dist/{aggregation-B3CD0v_d.d.cts → aggregation-ChpZDh0g.d.ts} +39 -6
- package/dist/{aggregation-BFzW07DE.d.ts → aggregation-OpnhwzF5.d.cts} +39 -6
- package/dist/billing/index.d.cts +448 -108
- package/dist/billing/index.d.ts +448 -108
- package/dist/billing/index.js +108 -41
- package/dist/catalog/index.d.cts +74 -45
- package/dist/catalog/index.d.ts +74 -45
- package/dist/catalog/index.js +21 -13
- package/dist/catalog.module-C9O7BxRq.d.ts +180 -0
- package/dist/catalog.module-T-I5Ricz.d.cts +180 -0
- package/dist/checkout-offer/index.d.cts +17 -22
- package/dist/checkout-offer/index.d.ts +17 -22
- package/dist/checkout-offer/index.js +21 -7
- package/dist/checkout-offer.module-DFhGy6JO.d.cts +58 -0
- package/dist/checkout-offer.module-x7SP_dX4.d.ts +58 -0
- package/dist/checkout-offer.service-BeHgYikI.d.ts +242 -0
- package/dist/checkout-offer.service-CCVxG9b2.d.cts +242 -0
- package/dist/chunk-34XVPR6P.js +222 -0
- package/dist/{chunk-AOQJEYOL.js → chunk-3QVGA6JX.js} +3 -1
- package/dist/chunk-3RLWML2S.js +896 -0
- package/dist/{chunk-TXC3LHHB.js → chunk-4SDSYV4A.js} +21 -13
- package/dist/chunk-55QEDAMX.js +946 -0
- package/dist/chunk-5CKC7O52.js +140 -0
- package/dist/chunk-6PJE7EWO.js +185 -0
- package/dist/chunk-7NJKVC5X.js +353 -0
- package/dist/{chunk-RUNZ3X4C.js → chunk-AOS2JPDD.js} +1263 -185
- package/dist/{chunk-WOVQPXV4.js → chunk-CQ2ZZMTD.js} +702 -725
- package/dist/{chunk-NA6O63B7.js → chunk-F5X66HF5.js} +5 -5
- package/dist/chunk-FEQZCWUL.js +174 -0
- package/dist/{chunk-VIJ5NJWC.js → chunk-G6EZWECL.js} +107 -31
- package/dist/chunk-G7RQO2XO.js +0 -0
- package/dist/{chunk-N3L3AICU.js → chunk-GPQWGA6B.js} +5 -6
- package/dist/chunk-GZTL64QK.js +7 -0
- package/dist/{chunk-SABTXESR.js → chunk-J7NJRK3K.js} +17 -1
- package/dist/{chunk-SEPN52AD.js → chunk-JBCC6C3M.js} +566 -307
- package/dist/{chunk-I7GTA3RX.js → chunk-JQRA724W.js} +1 -1
- package/dist/{chunk-WXYJHZCN.js → chunk-JVAEKTJ4.js} +2 -14
- package/dist/chunk-KPEMTBOP.js +26 -0
- package/dist/chunk-LF6J4YYN.js +301 -0
- package/dist/{chunk-LTT736P3.js → chunk-LLYVYRGJ.js} +228 -387
- package/dist/{chunk-6Z7JR4EW.js → chunk-M47BNEY2.js} +1897 -633
- package/dist/{chunk-KFT5AIIH.js → chunk-NDLC5GYK.js} +206 -24
- package/dist/{chunk-O2J2HDXA.js → chunk-OOTEXP47.js} +3 -8
- package/dist/chunk-QPVDCKYS.js +702 -0
- package/dist/{chunk-NHVDCYK5.js → chunk-R5YCJBHY.js} +71 -106
- package/dist/{chunk-XBYAFEOR.js → chunk-S33SO5XX.js} +1 -1
- package/dist/chunk-SZ7RFPXA.js +10 -0
- package/dist/chunk-TBBZWZQT.js +98 -0
- package/dist/chunk-TOEFN7DN.js +295 -0
- package/dist/{chunk-7ZEGFL42.js → chunk-WHJSYKNC.js} +6 -6
- package/dist/chunk-WOEJ6K7M.js +55 -0
- package/dist/{chunk-AU3OOREM.js → chunk-XSSWYPP5.js} +16 -3
- package/dist/contract-line-item-money-B0Z3Ogur.d.cts +43 -0
- package/dist/contract-line-item-money-B0Z3Ogur.d.ts +43 -0
- package/dist/discovery/index.d.cts +2 -2
- package/dist/discovery/index.d.ts +2 -2
- package/dist/discovery/index.js +6 -6
- package/dist/{discovery.scanner-9cMqF95o.d.cts → discovery.scanner-DXKc6JkV.d.cts} +1 -1
- package/dist/{discovery.scanner-9cMqF95o.d.ts → discovery.scanner-DXKc6JkV.d.ts} +1 -1
- package/dist/{enforce-quota.interceptor-Df0e3OWe.d.cts → enforce-quota.interceptor-BFyVdWe8.d.cts} +6 -6
- package/dist/{enforce-quota.interceptor-DW3etVyI.d.ts → enforce-quota.interceptor-GaBXboGx.d.ts} +6 -6
- package/dist/entitlement/index.d.cts +27 -4
- package/dist/entitlement/index.d.ts +27 -4
- package/dist/entitlement/index.js +13 -8
- package/dist/index.d.cts +209 -28
- package/dist/index.d.ts +209 -28
- package/dist/index.js +285 -163
- package/dist/issuer-identity.check-CBO0vcsq.d.cts +197 -0
- package/dist/issuer-identity.check-Cz9CEMkZ.d.ts +197 -0
- package/dist/{module-options-COSEb0VW.d.ts → module-options-DmQ3G4sZ.d.ts} +135 -41
- package/dist/{module-options-BG3MzQva.d.cts → module-options-qAOwinHR.d.cts} +135 -41
- package/dist/payment-callback.service-CR84Xw1Z.d.cts +125 -0
- package/dist/payment-callback.service-CR84Xw1Z.d.ts +125 -0
- package/dist/payments/index.cjs +4 -0
- package/dist/payments/index.d.cts +187 -0
- package/dist/payments/index.d.ts +187 -0
- package/dist/payments/index.js +141 -0
- package/dist/payments.module-BdUq9ot_.d.cts +57 -0
- package/dist/payments.module-CQGv_VG7.d.ts +57 -0
- package/dist/plan-catalog-source-DWe-BGY1.d.cts +21 -0
- package/dist/plan-catalog-source-DWe-BGY1.d.ts +21 -0
- package/dist/{plan-resolution-Cgo_TR1H.d.cts → plan-resolution-CwUy_OqC.d.cts} +14 -0
- package/dist/{plan-resolution-Cgo_TR1H.d.ts → plan-resolution-CwUy_OqC.d.ts} +14 -0
- package/dist/{plan-versions.service-DChhbK6h.d.ts → plan-versions.service-C0N-Em2W.d.ts} +38 -64
- package/dist/{plan-versions.service-TPEtbN0r.d.cts → plan-versions.service-DARLh-qI.d.cts} +38 -64
- package/dist/platform/index.d.cts +52 -23
- package/dist/platform/index.d.ts +52 -23
- package/dist/platform/index.js +57 -36
- package/dist/promo/index.d.cts +23 -8
- package/dist/promo/index.d.ts +23 -8
- package/dist/promo/index.js +15 -7
- package/dist/{promo.module-DtvIycpt.d.cts → promo.module-CKkECmU8.d.cts} +9 -3
- package/dist/{promo.module-Z8h1PNX-.d.ts → promo.module-DuIJdK3U.d.ts} +9 -3
- package/dist/promo.service-BYBu6dy3.d.cts +215 -0
- package/dist/promo.service-CFjfF0Xm.d.ts +215 -0
- package/dist/registration/index.d.cts +104 -47
- package/dist/registration/index.d.ts +104 -47
- package/dist/registration/index.js +15 -9
- package/dist/subscriber/index.cjs +4 -0
- package/dist/subscriber/index.d.cts +28 -0
- package/dist/subscriber/index.d.ts +28 -0
- package/dist/subscriber/index.js +16 -0
- package/dist/subscriber.service-5W6Gi-1B.d.cts +68 -0
- package/dist/subscriber.service-5W6Gi-1B.d.ts +68 -0
- package/dist/subscription-contract/index.d.cts +4 -2
- package/dist/subscription-contract/index.d.ts +4 -2
- package/dist/subscription-contract/index.js +13 -5
- package/dist/{subscription-contract.module-fDFdQ0jm.d.ts → subscription-contract.module-BfIRpc1o.d.ts} +8 -2
- package/dist/{subscription-contract.module-CEK8HS5-.d.cts → subscription-contract.module-DTMuUJYd.d.cts} +8 -2
- package/dist/{subscription-contract.service-hD87MKyg.d.cts → subscription-contract.service-CPZrTM9C.d.ts} +32 -3
- package/dist/{subscription-contract.service-hD87MKyg.d.ts → subscription-contract.service-CfNApLuP.d.cts} +32 -3
- package/dist/tenant-billing.controller-BLqbsONe.d.ts +812 -0
- package/dist/tenant-billing.controller-DKbAqTbM.d.cts +812 -0
- package/dist/tenant-billing.module-ClbjzocC.d.cts +364 -0
- package/dist/tenant-billing.module-DohgJJ2m.d.ts +364 -0
- package/dist/tenant-billing.tokens-G-1xOlMr.d.cts +129 -0
- package/dist/tenant-billing.tokens-G-1xOlMr.d.ts +129 -0
- package/dist/testing/index.d.cts +44 -17
- package/dist/testing/index.d.ts +44 -17
- package/dist/testing/index.js +189 -40
- package/package.json +24 -4
- package/dist/catalog.module-BDDO6iwq.d.cts +0 -103
- package/dist/catalog.module-BTnMsE6u.d.ts +0 -103
- package/dist/checkout-offer.module-CMtiQJTT.d.ts +0 -39
- package/dist/checkout-offer.module-CVpWrzbe.d.cts +0 -39
- package/dist/checkout-offer.service-BLOv2HOo.d.cts +0 -49
- package/dist/checkout-offer.service-BLOv2HOo.d.ts +0 -49
- package/dist/chunk-57V6ZTI6.js +0 -22
- package/dist/chunk-BSK6YBLI.js +0 -87
- package/dist/chunk-DQKCK7DX.js +0 -217
- package/dist/chunk-VXEYLNIB.js +0 -632
- package/dist/chunk-WUDYIPYH.js +0 -715
- package/dist/define-saasicat-DROBe-b1.d.ts +0 -69
- package/dist/define-saasicat-vGBCkFys.d.cts +0 -69
- package/dist/promo.service-BJbKAmw3.d.cts +0 -112
- package/dist/promo.service-BJbKAmw3.d.ts +0 -112
- package/dist/tenant-billing.controller-BQ67mlmI.d.ts +0 -438
- package/dist/tenant-billing.controller-DS8kB8a7.d.cts +0 -438
- package/dist/tenant-billing.module-BznC3XtW.d.cts +0 -299
- package/dist/tenant-billing.module-wUbsQSFG.d.ts +0 -299
- /package/dist/{chunk-2FR6ZL7R.js → chunk-BHZOH2DY.js} +0 -0
- /package/dist/{chunk-2SLTRKXC.js → chunk-DFOW3JVO.js} +0 -0
- /package/dist/{chunk-DBZGV3HC.js → chunk-DU56UKEH.js} +0 -0
- /package/dist/{chunk-OYNHOY45.js → chunk-GAUEVIAE.js} +0 -0
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { PendingRegistrationRepository,
|
|
1
|
+
import { PendingRegistrationRepository, ActivationOrchestrator, RegistrationAuditLogger, SubscriberPaymentMethodRepository, PendingRegistration, RegistrationBillingDetails, PaymentGatewayCallback, RegistrationOtpDelivery, UserAccountLookup, SlugAvailabilityCheck, PasswordHasher, PlanCatalogLookup, RegistrationResumeTokenSigner, RegistrationResumeDelivery, RegistrationConfiguratorLookup, RegistrationPromoPreview, PublicSignupPlan, SelectPlanInput, RegistrationAuditContext, SelectPlanResult, StartCheckoutInput, StartCheckoutResult, CleanupResult, StartRegistrationInput, StartRegistrationResult, VerifyRegistrationOtpResult, ResumeRegistrationInput, ResumeRegistrationResult, ConfiguratorCatalog, SaveRegistrationConfigInput, SaveRegistrationConfigResult, ConfiguratorPriceBreakdown, RegistrationConfigSelection } from '@saasicat/core';
|
|
2
2
|
export { PasswordHasher } from '@saasicat/core';
|
|
3
|
-
import {
|
|
3
|
+
import { b as CheckoutOfferService } from '../checkout-offer.service-CCVxG9b2.cjs';
|
|
4
|
+
import { OnModuleInit, OnApplicationBootstrap, CanActivate, ExecutionContext, Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
5
|
+
import { P as PaymentGatewayRegistry, a as PaymentCallbackService } from '../payment-callback.service-CR84Xw1Z.cjs';
|
|
4
6
|
import { P as ProviderSpec } from '../di-CcNeq9v-.cjs';
|
|
5
7
|
export { CronExpression } from '@nestjs/schedule';
|
|
8
|
+
import '../subscription-contract.service-CfNApLuP.cjs';
|
|
9
|
+
import '../subscriber.service-5W6Gi-1B.cjs';
|
|
10
|
+
import '../promo.service-BYBu6dy3.cjs';
|
|
11
|
+
import '../plan-catalog-source-DWe-BGY1.cjs';
|
|
6
12
|
|
|
7
13
|
/** 6-digit numeric OTP code, uniformly distributed from 100000..999999. */
|
|
8
14
|
declare function generateOtpCode(): string;
|
|
@@ -27,8 +33,6 @@ declare const USER_ACCOUNT_LOOKUP_TOKEN: unique symbol;
|
|
|
27
33
|
declare const SLUG_AVAILABILITY_CHECK_TOKEN: unique symbol;
|
|
28
34
|
declare const PASSWORD_HASHER_TOKEN: unique symbol;
|
|
29
35
|
declare const PLAN_CATALOG_LOOKUP_TOKEN: unique symbol;
|
|
30
|
-
declare const PAYMENT_PROVIDER_TOKEN: unique symbol;
|
|
31
|
-
declare const PAYMENT_EVENT_LOG_TOKEN: unique symbol;
|
|
32
36
|
declare const ACTIVATION_ORCHESTRATOR_TOKEN: unique symbol;
|
|
33
37
|
declare const REGISTRATION_AUDIT_LOGGER_TOKEN: unique symbol;
|
|
34
38
|
declare const REGISTRATION_RESUME_TOKEN_SIGNER_TOKEN: unique symbol;
|
|
@@ -39,6 +43,65 @@ declare const REGISTRATION_PROMO_PREVIEW_TOKEN: unique symbol;
|
|
|
39
43
|
/** Optionally injectable configuration — falls back to default TTLs from @saasicat/core. */
|
|
40
44
|
declare const REGISTRATION_CONFIG_TOKEN: unique symbol;
|
|
41
45
|
|
|
46
|
+
interface RegistrationSetupUrls {
|
|
47
|
+
successUrl: string;
|
|
48
|
+
cancelUrl: string;
|
|
49
|
+
}
|
|
50
|
+
interface RegistrationSetupStarted {
|
|
51
|
+
updated: PendingRegistration;
|
|
52
|
+
sessionRef: string;
|
|
53
|
+
redirectUrl: string;
|
|
54
|
+
/** The last moment a confirmation of this session can arrive, as the gateway reports it. */
|
|
55
|
+
confirmableUntil: Date | null;
|
|
56
|
+
/** A confirmation the gateway already holds, for `confirm`. */
|
|
57
|
+
immediate: {
|
|
58
|
+
account: string;
|
|
59
|
+
callback: PaymentGatewayCallback;
|
|
60
|
+
} | null;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Step 4 of a sign-up: the billing address and the payment method, and the
|
|
64
|
+
* activation once the gateway confirmed it.
|
|
65
|
+
*
|
|
66
|
+
* The confirmation arrives as a gateway callback, claimed on a transaction the
|
|
67
|
+
* platform opens. The application's `ActivationOrchestrator` writes the user,
|
|
68
|
+
* the tenant, the subscriber and the subscription on that transaction, and the
|
|
69
|
+
* payment method is recorded for the subscriber on it too — all of it, the
|
|
70
|
+
* claim included, or none of it.
|
|
71
|
+
*/
|
|
72
|
+
declare class RegistrationPaymentService implements OnModuleInit, OnApplicationBootstrap {
|
|
73
|
+
private readonly repo;
|
|
74
|
+
private readonly orchestrator;
|
|
75
|
+
private readonly audit;
|
|
76
|
+
private readonly registry;
|
|
77
|
+
private readonly callbacks;
|
|
78
|
+
private readonly methods;
|
|
79
|
+
private readonly logger;
|
|
80
|
+
constructor(repo: PendingRegistrationRepository, orchestrator: ActivationOrchestrator, audit: RegistrationAuditLogger, registry?: PaymentGatewayRegistry | null, callbacks?: PaymentCallbackService | null, methods?: SubscriberPaymentMethodRepository | null);
|
|
81
|
+
onModuleInit(): void;
|
|
82
|
+
onApplicationBootstrap(): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Records the billing details and opens the gateway's form. Returns the
|
|
85
|
+
* record as it now stands, where to send the person, and what `confirm`
|
|
86
|
+
* hands on when the gateway confirmed on the spot. The checkout expires
|
|
87
|
+
* `PENDING_CHECKOUT_TTL_DAYS` after `startedAt`.
|
|
88
|
+
*/
|
|
89
|
+
startSetup(pending: PendingRegistration, billingDetails: RegistrationBillingDetails, urls: RegistrationSetupUrls, startedAt: Date): Promise<RegistrationSetupStarted>;
|
|
90
|
+
/** Handles a confirmation the gateway gave when the setup started, like any callback. */
|
|
91
|
+
confirm(started: RegistrationSetupStarted): Promise<void>;
|
|
92
|
+
private activate;
|
|
93
|
+
private noteFailure;
|
|
94
|
+
/**
|
|
95
|
+
* The sign-up a setup event is about, found by the session its account
|
|
96
|
+
* opened. `null` — and nothing done — when there is none waiting: it was
|
|
97
|
+
* activated already, or expired and was cleaned up, or the event names a
|
|
98
|
+
* different sign-up than the session belongs to.
|
|
99
|
+
*/
|
|
100
|
+
private pendingFor;
|
|
101
|
+
private payments;
|
|
102
|
+
private record;
|
|
103
|
+
}
|
|
104
|
+
|
|
42
105
|
/**
|
|
43
106
|
* Orchestrates step 1 (capture registration data) and step 2 (OTP verification)
|
|
44
107
|
* of the multi-step registration flow.
|
|
@@ -61,36 +124,32 @@ declare class PendingRegistrationService {
|
|
|
61
124
|
private readonly slugCheck;
|
|
62
125
|
private readonly passwordHasher;
|
|
63
126
|
private readonly planCatalog;
|
|
64
|
-
private readonly
|
|
65
|
-
private readonly paymentEventLog;
|
|
66
|
-
private readonly activationOrchestrator;
|
|
127
|
+
private readonly payments;
|
|
67
128
|
private readonly audit;
|
|
68
129
|
private readonly resumeTokenSigner?;
|
|
69
130
|
private readonly resumeDelivery?;
|
|
70
131
|
private readonly resumeBaseUrl?;
|
|
71
132
|
private readonly configuratorLookup?;
|
|
72
133
|
private readonly promoPreview?;
|
|
134
|
+
private readonly checkoutOffers?;
|
|
73
135
|
private readonly logger;
|
|
74
|
-
constructor(repo: PendingRegistrationRepository, otpDelivery: RegistrationOtpDelivery, userLookup: UserAccountLookup, slugCheck: SlugAvailabilityCheck, passwordHasher: PasswordHasher, planCatalog: PlanCatalogLookup,
|
|
136
|
+
constructor(repo: PendingRegistrationRepository, otpDelivery: RegistrationOtpDelivery, userLookup: UserAccountLookup, slugCheck: SlugAvailabilityCheck, passwordHasher: PasswordHasher, planCatalog: PlanCatalogLookup, payments: RegistrationPaymentService, audit: RegistrationAuditLogger, resumeTokenSigner?: RegistrationResumeTokenSigner | undefined, resumeDelivery?: RegistrationResumeDelivery | undefined, resumeBaseUrl?: string | undefined, configuratorLookup?: RegistrationConfiguratorLookup | undefined, promoPreview?: RegistrationPromoPreview | undefined, checkoutOffers?: CheckoutOfferService | undefined);
|
|
75
137
|
private record;
|
|
76
138
|
/** Public signup plan list for step 3 (frontend `usePublicPlans()`). */
|
|
77
139
|
listPublicPlans(): Promise<PublicSignupPlan[]>;
|
|
78
140
|
selectPlan(input: SelectPlanInput, context?: RegistrationAuditContext): Promise<SelectPlanResult>;
|
|
79
141
|
startCheckout(input: StartCheckoutInput, context?: RegistrationAuditContext): Promise<StartCheckoutResult>;
|
|
80
142
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
*
|
|
89
|
-
* On errors in step 2/3 the EventLog entry remains — provider retries then
|
|
90
|
-
* run into ALREADY_PROCESSED. Operational repair is done manually (status
|
|
91
|
-
* inspection + cleanup).
|
|
143
|
+
* Gives back the slot a failed start took: its form did not open, or its
|
|
144
|
+
* slot could not be moved to the form's end. The failure is the answer the
|
|
145
|
+
* caller gets; a slot that cannot be given back here lapses with its short
|
|
146
|
+
* hold, so this failure is logged rather than put in the way of that answer.
|
|
147
|
+
*/
|
|
148
|
+
private giveBackHoldOf;
|
|
149
|
+
/**
|
|
150
|
+
* Holds the promo code of the offer the sign-up concludes until `until`.
|
|
92
151
|
*/
|
|
93
|
-
|
|
152
|
+
private holdPromoCodeOf;
|
|
94
153
|
/**
|
|
95
154
|
* Deletes all PendingRegistration records with `expiresAt < now`.
|
|
96
155
|
* Full deletion (no anonymization path) is the simpler option: the schema
|
|
@@ -234,8 +293,6 @@ interface RegistrationModuleOptions {
|
|
|
234
293
|
slugAvailabilityCheck: ProviderSpec<SlugAvailabilityCheck>;
|
|
235
294
|
passwordHasher: ProviderSpec<PasswordHasher>;
|
|
236
295
|
planCatalogLookup: ProviderSpec<PlanCatalogLookup>;
|
|
237
|
-
paymentProvider: ProviderSpec<PaymentProvider>;
|
|
238
|
-
paymentEventLog: ProviderSpec<PaymentEventLog>;
|
|
239
296
|
activationOrchestrator: ProviderSpec<ActivationOrchestrator>;
|
|
240
297
|
auditLogger: ProviderSpec<RegistrationAuditLogger>;
|
|
241
298
|
/**
|
|
@@ -326,35 +383,32 @@ declare class SelectRegistrationPlanDto {
|
|
|
326
383
|
planId: string;
|
|
327
384
|
}
|
|
328
385
|
|
|
386
|
+
/** The billing address and tax identifiers step 4 asks for, which the subscriber is created with. */
|
|
387
|
+
declare class RegistrationBillingDetailsDto {
|
|
388
|
+
addressLine1: string;
|
|
389
|
+
addressLine2?: string | null;
|
|
390
|
+
postalCode: string;
|
|
391
|
+
city: string;
|
|
392
|
+
/** ISO 3166-1 alpha-2, e.g. `DE`. */
|
|
393
|
+
country: string;
|
|
394
|
+
vatId?: string | null;
|
|
395
|
+
taxNumber?: string | null;
|
|
396
|
+
}
|
|
329
397
|
/**
|
|
330
|
-
* Input for step 4
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
* action.
|
|
398
|
+
* Input for step 4 — `POST /auth/register/start-checkout`: the billing details,
|
|
399
|
+
* and where the payment gateway's form sends the person once the payment method
|
|
400
|
+
* is set up, or when they leave it.
|
|
334
401
|
*/
|
|
335
402
|
declare class StartRegistrationCheckoutDto {
|
|
336
403
|
pendingRegistrationId: string;
|
|
404
|
+
billingDetails: RegistrationBillingDetailsDto;
|
|
337
405
|
successUrl: string;
|
|
338
406
|
cancelUrl: string;
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
* Provider-agnostic: the Stripe adapter (phase 2.4) maps Stripe's
|
|
345
|
-
* `checkout.session.completed` → `{ eventId, sessionId, status: 'SUCCEEDED' }`,
|
|
346
|
-
* `payment_intent.payment_failed` → `{ status: 'FAILED' }`, etc.
|
|
347
|
-
*
|
|
348
|
-
* In production the signature verification (Stripe `Stripe-Signature`
|
|
349
|
-
* header) should run BEFORE the DTO validation — see StripeWebhookGuard in
|
|
350
|
-
* the app module.
|
|
351
|
-
*/
|
|
352
|
-
declare class PaymentWebhookDto {
|
|
353
|
-
eventId: string;
|
|
354
|
-
sessionId?: string;
|
|
355
|
-
provider: string;
|
|
356
|
-
status: 'SUCCEEDED' | 'FAILED';
|
|
357
|
-
payload?: Record<string, unknown>;
|
|
407
|
+
/**
|
|
408
|
+
* The checkout offer the sign-up concludes; its promo code is held until a
|
|
409
|
+
* confirmation of the payment form can no longer arrive.
|
|
410
|
+
*/
|
|
411
|
+
checkoutOfferId?: string | null;
|
|
358
412
|
}
|
|
359
413
|
|
|
360
414
|
/**
|
|
@@ -401,7 +455,10 @@ declare class PreviewRegistrationPromoDto {
|
|
|
401
455
|
}
|
|
402
456
|
|
|
403
457
|
interface PromoEvaluation {
|
|
404
|
-
/**
|
|
458
|
+
/**
|
|
459
|
+
* The discount in gross, as the promo preview reckons it against the gross
|
|
460
|
+
* subtotal. `computeBreakdown` converts it to net before taking it off.
|
|
461
|
+
*/
|
|
405
462
|
discountAmount: number;
|
|
406
463
|
/** Percentage for UI display. */
|
|
407
464
|
percent: number;
|
|
@@ -420,4 +477,4 @@ declare function resolveModel(catalog: ConfiguratorCatalog, modelId: string): {
|
|
|
420
477
|
yearlyNet: number;
|
|
421
478
|
};
|
|
422
479
|
|
|
423
|
-
export { ACTIVATION_ORCHESTRATOR_TOKEN, BaseIpRateLimitGuard, ContinueRegistrationDto, PASSWORD_HASHER_TOKEN,
|
|
480
|
+
export { ACTIVATION_ORCHESTRATOR_TOKEN, BaseIpRateLimitGuard, ContinueRegistrationDto, PASSWORD_HASHER_TOKEN, PENDING_REGISTRATION_REPOSITORY_TOKEN, PLAN_CATALOG_LOOKUP_TOKEN, PendingRegistrationService, PreviewRegistrationPromoDto, type PromoEvaluation, REGISTRATION_AUDIT_LOGGER_TOKEN, REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN, REGISTRATION_CONFIG_TOKEN, REGISTRATION_OTP_DELIVERY_TOKEN, REGISTRATION_PROMO_PREVIEW_TOKEN, REGISTRATION_RESUME_BASE_URL_TOKEN, REGISTRATION_RESUME_DELIVERY_TOKEN, REGISTRATION_RESUME_TOKEN_SIGNER_TOKEN, RegisterStartDto, RegistrationBillingDetailsDto, RegistrationCleanupCron, RegistrationModule, type RegistrationModuleOptions, ResendRegistrationOtpDto, SLUG_AVAILABILITY_CHECK_TOKEN, SaveRegistrationConfigDto, SaveRegistrationConfigSelectionDto, SelectRegistrationPlanDto, StartRegistrationCheckoutDto, USER_ACCOUNT_LOOKUP_TOKEN, VerifyRegistrationOtpDto, computeBreakdown, generateOtpCode, hashOtpCode, resolveModel, slugify, verifyOtpCode };
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { PendingRegistrationRepository,
|
|
1
|
+
import { PendingRegistrationRepository, ActivationOrchestrator, RegistrationAuditLogger, SubscriberPaymentMethodRepository, PendingRegistration, RegistrationBillingDetails, PaymentGatewayCallback, RegistrationOtpDelivery, UserAccountLookup, SlugAvailabilityCheck, PasswordHasher, PlanCatalogLookup, RegistrationResumeTokenSigner, RegistrationResumeDelivery, RegistrationConfiguratorLookup, RegistrationPromoPreview, PublicSignupPlan, SelectPlanInput, RegistrationAuditContext, SelectPlanResult, StartCheckoutInput, StartCheckoutResult, CleanupResult, StartRegistrationInput, StartRegistrationResult, VerifyRegistrationOtpResult, ResumeRegistrationInput, ResumeRegistrationResult, ConfiguratorCatalog, SaveRegistrationConfigInput, SaveRegistrationConfigResult, ConfiguratorPriceBreakdown, RegistrationConfigSelection } from '@saasicat/core';
|
|
2
2
|
export { PasswordHasher } from '@saasicat/core';
|
|
3
|
-
import {
|
|
3
|
+
import { b as CheckoutOfferService } from '../checkout-offer.service-BeHgYikI.js';
|
|
4
|
+
import { OnModuleInit, OnApplicationBootstrap, CanActivate, ExecutionContext, Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
5
|
+
import { P as PaymentGatewayRegistry, a as PaymentCallbackService } from '../payment-callback.service-CR84Xw1Z.js';
|
|
4
6
|
import { P as ProviderSpec } from '../di-CcNeq9v-.js';
|
|
5
7
|
export { CronExpression } from '@nestjs/schedule';
|
|
8
|
+
import '../subscription-contract.service-CPZrTM9C.js';
|
|
9
|
+
import '../subscriber.service-5W6Gi-1B.js';
|
|
10
|
+
import '../promo.service-CFjfF0Xm.js';
|
|
11
|
+
import '../plan-catalog-source-DWe-BGY1.js';
|
|
6
12
|
|
|
7
13
|
/** 6-digit numeric OTP code, uniformly distributed from 100000..999999. */
|
|
8
14
|
declare function generateOtpCode(): string;
|
|
@@ -27,8 +33,6 @@ declare const USER_ACCOUNT_LOOKUP_TOKEN: unique symbol;
|
|
|
27
33
|
declare const SLUG_AVAILABILITY_CHECK_TOKEN: unique symbol;
|
|
28
34
|
declare const PASSWORD_HASHER_TOKEN: unique symbol;
|
|
29
35
|
declare const PLAN_CATALOG_LOOKUP_TOKEN: unique symbol;
|
|
30
|
-
declare const PAYMENT_PROVIDER_TOKEN: unique symbol;
|
|
31
|
-
declare const PAYMENT_EVENT_LOG_TOKEN: unique symbol;
|
|
32
36
|
declare const ACTIVATION_ORCHESTRATOR_TOKEN: unique symbol;
|
|
33
37
|
declare const REGISTRATION_AUDIT_LOGGER_TOKEN: unique symbol;
|
|
34
38
|
declare const REGISTRATION_RESUME_TOKEN_SIGNER_TOKEN: unique symbol;
|
|
@@ -39,6 +43,65 @@ declare const REGISTRATION_PROMO_PREVIEW_TOKEN: unique symbol;
|
|
|
39
43
|
/** Optionally injectable configuration — falls back to default TTLs from @saasicat/core. */
|
|
40
44
|
declare const REGISTRATION_CONFIG_TOKEN: unique symbol;
|
|
41
45
|
|
|
46
|
+
interface RegistrationSetupUrls {
|
|
47
|
+
successUrl: string;
|
|
48
|
+
cancelUrl: string;
|
|
49
|
+
}
|
|
50
|
+
interface RegistrationSetupStarted {
|
|
51
|
+
updated: PendingRegistration;
|
|
52
|
+
sessionRef: string;
|
|
53
|
+
redirectUrl: string;
|
|
54
|
+
/** The last moment a confirmation of this session can arrive, as the gateway reports it. */
|
|
55
|
+
confirmableUntil: Date | null;
|
|
56
|
+
/** A confirmation the gateway already holds, for `confirm`. */
|
|
57
|
+
immediate: {
|
|
58
|
+
account: string;
|
|
59
|
+
callback: PaymentGatewayCallback;
|
|
60
|
+
} | null;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Step 4 of a sign-up: the billing address and the payment method, and the
|
|
64
|
+
* activation once the gateway confirmed it.
|
|
65
|
+
*
|
|
66
|
+
* The confirmation arrives as a gateway callback, claimed on a transaction the
|
|
67
|
+
* platform opens. The application's `ActivationOrchestrator` writes the user,
|
|
68
|
+
* the tenant, the subscriber and the subscription on that transaction, and the
|
|
69
|
+
* payment method is recorded for the subscriber on it too — all of it, the
|
|
70
|
+
* claim included, or none of it.
|
|
71
|
+
*/
|
|
72
|
+
declare class RegistrationPaymentService implements OnModuleInit, OnApplicationBootstrap {
|
|
73
|
+
private readonly repo;
|
|
74
|
+
private readonly orchestrator;
|
|
75
|
+
private readonly audit;
|
|
76
|
+
private readonly registry;
|
|
77
|
+
private readonly callbacks;
|
|
78
|
+
private readonly methods;
|
|
79
|
+
private readonly logger;
|
|
80
|
+
constructor(repo: PendingRegistrationRepository, orchestrator: ActivationOrchestrator, audit: RegistrationAuditLogger, registry?: PaymentGatewayRegistry | null, callbacks?: PaymentCallbackService | null, methods?: SubscriberPaymentMethodRepository | null);
|
|
81
|
+
onModuleInit(): void;
|
|
82
|
+
onApplicationBootstrap(): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Records the billing details and opens the gateway's form. Returns the
|
|
85
|
+
* record as it now stands, where to send the person, and what `confirm`
|
|
86
|
+
* hands on when the gateway confirmed on the spot. The checkout expires
|
|
87
|
+
* `PENDING_CHECKOUT_TTL_DAYS` after `startedAt`.
|
|
88
|
+
*/
|
|
89
|
+
startSetup(pending: PendingRegistration, billingDetails: RegistrationBillingDetails, urls: RegistrationSetupUrls, startedAt: Date): Promise<RegistrationSetupStarted>;
|
|
90
|
+
/** Handles a confirmation the gateway gave when the setup started, like any callback. */
|
|
91
|
+
confirm(started: RegistrationSetupStarted): Promise<void>;
|
|
92
|
+
private activate;
|
|
93
|
+
private noteFailure;
|
|
94
|
+
/**
|
|
95
|
+
* The sign-up a setup event is about, found by the session its account
|
|
96
|
+
* opened. `null` — and nothing done — when there is none waiting: it was
|
|
97
|
+
* activated already, or expired and was cleaned up, or the event names a
|
|
98
|
+
* different sign-up than the session belongs to.
|
|
99
|
+
*/
|
|
100
|
+
private pendingFor;
|
|
101
|
+
private payments;
|
|
102
|
+
private record;
|
|
103
|
+
}
|
|
104
|
+
|
|
42
105
|
/**
|
|
43
106
|
* Orchestrates step 1 (capture registration data) and step 2 (OTP verification)
|
|
44
107
|
* of the multi-step registration flow.
|
|
@@ -61,36 +124,32 @@ declare class PendingRegistrationService {
|
|
|
61
124
|
private readonly slugCheck;
|
|
62
125
|
private readonly passwordHasher;
|
|
63
126
|
private readonly planCatalog;
|
|
64
|
-
private readonly
|
|
65
|
-
private readonly paymentEventLog;
|
|
66
|
-
private readonly activationOrchestrator;
|
|
127
|
+
private readonly payments;
|
|
67
128
|
private readonly audit;
|
|
68
129
|
private readonly resumeTokenSigner?;
|
|
69
130
|
private readonly resumeDelivery?;
|
|
70
131
|
private readonly resumeBaseUrl?;
|
|
71
132
|
private readonly configuratorLookup?;
|
|
72
133
|
private readonly promoPreview?;
|
|
134
|
+
private readonly checkoutOffers?;
|
|
73
135
|
private readonly logger;
|
|
74
|
-
constructor(repo: PendingRegistrationRepository, otpDelivery: RegistrationOtpDelivery, userLookup: UserAccountLookup, slugCheck: SlugAvailabilityCheck, passwordHasher: PasswordHasher, planCatalog: PlanCatalogLookup,
|
|
136
|
+
constructor(repo: PendingRegistrationRepository, otpDelivery: RegistrationOtpDelivery, userLookup: UserAccountLookup, slugCheck: SlugAvailabilityCheck, passwordHasher: PasswordHasher, planCatalog: PlanCatalogLookup, payments: RegistrationPaymentService, audit: RegistrationAuditLogger, resumeTokenSigner?: RegistrationResumeTokenSigner | undefined, resumeDelivery?: RegistrationResumeDelivery | undefined, resumeBaseUrl?: string | undefined, configuratorLookup?: RegistrationConfiguratorLookup | undefined, promoPreview?: RegistrationPromoPreview | undefined, checkoutOffers?: CheckoutOfferService | undefined);
|
|
75
137
|
private record;
|
|
76
138
|
/** Public signup plan list for step 3 (frontend `usePublicPlans()`). */
|
|
77
139
|
listPublicPlans(): Promise<PublicSignupPlan[]>;
|
|
78
140
|
selectPlan(input: SelectPlanInput, context?: RegistrationAuditContext): Promise<SelectPlanResult>;
|
|
79
141
|
startCheckout(input: StartCheckoutInput, context?: RegistrationAuditContext): Promise<StartCheckoutResult>;
|
|
80
142
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
*
|
|
89
|
-
* On errors in step 2/3 the EventLog entry remains — provider retries then
|
|
90
|
-
* run into ALREADY_PROCESSED. Operational repair is done manually (status
|
|
91
|
-
* inspection + cleanup).
|
|
143
|
+
* Gives back the slot a failed start took: its form did not open, or its
|
|
144
|
+
* slot could not be moved to the form's end. The failure is the answer the
|
|
145
|
+
* caller gets; a slot that cannot be given back here lapses with its short
|
|
146
|
+
* hold, so this failure is logged rather than put in the way of that answer.
|
|
147
|
+
*/
|
|
148
|
+
private giveBackHoldOf;
|
|
149
|
+
/**
|
|
150
|
+
* Holds the promo code of the offer the sign-up concludes until `until`.
|
|
92
151
|
*/
|
|
93
|
-
|
|
152
|
+
private holdPromoCodeOf;
|
|
94
153
|
/**
|
|
95
154
|
* Deletes all PendingRegistration records with `expiresAt < now`.
|
|
96
155
|
* Full deletion (no anonymization path) is the simpler option: the schema
|
|
@@ -234,8 +293,6 @@ interface RegistrationModuleOptions {
|
|
|
234
293
|
slugAvailabilityCheck: ProviderSpec<SlugAvailabilityCheck>;
|
|
235
294
|
passwordHasher: ProviderSpec<PasswordHasher>;
|
|
236
295
|
planCatalogLookup: ProviderSpec<PlanCatalogLookup>;
|
|
237
|
-
paymentProvider: ProviderSpec<PaymentProvider>;
|
|
238
|
-
paymentEventLog: ProviderSpec<PaymentEventLog>;
|
|
239
296
|
activationOrchestrator: ProviderSpec<ActivationOrchestrator>;
|
|
240
297
|
auditLogger: ProviderSpec<RegistrationAuditLogger>;
|
|
241
298
|
/**
|
|
@@ -326,35 +383,32 @@ declare class SelectRegistrationPlanDto {
|
|
|
326
383
|
planId: string;
|
|
327
384
|
}
|
|
328
385
|
|
|
386
|
+
/** The billing address and tax identifiers step 4 asks for, which the subscriber is created with. */
|
|
387
|
+
declare class RegistrationBillingDetailsDto {
|
|
388
|
+
addressLine1: string;
|
|
389
|
+
addressLine2?: string | null;
|
|
390
|
+
postalCode: string;
|
|
391
|
+
city: string;
|
|
392
|
+
/** ISO 3166-1 alpha-2, e.g. `DE`. */
|
|
393
|
+
country: string;
|
|
394
|
+
vatId?: string | null;
|
|
395
|
+
taxNumber?: string | null;
|
|
396
|
+
}
|
|
329
397
|
/**
|
|
330
|
-
* Input for step 4
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
* action.
|
|
398
|
+
* Input for step 4 — `POST /auth/register/start-checkout`: the billing details,
|
|
399
|
+
* and where the payment gateway's form sends the person once the payment method
|
|
400
|
+
* is set up, or when they leave it.
|
|
334
401
|
*/
|
|
335
402
|
declare class StartRegistrationCheckoutDto {
|
|
336
403
|
pendingRegistrationId: string;
|
|
404
|
+
billingDetails: RegistrationBillingDetailsDto;
|
|
337
405
|
successUrl: string;
|
|
338
406
|
cancelUrl: string;
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
* Provider-agnostic: the Stripe adapter (phase 2.4) maps Stripe's
|
|
345
|
-
* `checkout.session.completed` → `{ eventId, sessionId, status: 'SUCCEEDED' }`,
|
|
346
|
-
* `payment_intent.payment_failed` → `{ status: 'FAILED' }`, etc.
|
|
347
|
-
*
|
|
348
|
-
* In production the signature verification (Stripe `Stripe-Signature`
|
|
349
|
-
* header) should run BEFORE the DTO validation — see StripeWebhookGuard in
|
|
350
|
-
* the app module.
|
|
351
|
-
*/
|
|
352
|
-
declare class PaymentWebhookDto {
|
|
353
|
-
eventId: string;
|
|
354
|
-
sessionId?: string;
|
|
355
|
-
provider: string;
|
|
356
|
-
status: 'SUCCEEDED' | 'FAILED';
|
|
357
|
-
payload?: Record<string, unknown>;
|
|
407
|
+
/**
|
|
408
|
+
* The checkout offer the sign-up concludes; its promo code is held until a
|
|
409
|
+
* confirmation of the payment form can no longer arrive.
|
|
410
|
+
*/
|
|
411
|
+
checkoutOfferId?: string | null;
|
|
358
412
|
}
|
|
359
413
|
|
|
360
414
|
/**
|
|
@@ -401,7 +455,10 @@ declare class PreviewRegistrationPromoDto {
|
|
|
401
455
|
}
|
|
402
456
|
|
|
403
457
|
interface PromoEvaluation {
|
|
404
|
-
/**
|
|
458
|
+
/**
|
|
459
|
+
* The discount in gross, as the promo preview reckons it against the gross
|
|
460
|
+
* subtotal. `computeBreakdown` converts it to net before taking it off.
|
|
461
|
+
*/
|
|
405
462
|
discountAmount: number;
|
|
406
463
|
/** Percentage for UI display. */
|
|
407
464
|
percent: number;
|
|
@@ -420,4 +477,4 @@ declare function resolveModel(catalog: ConfiguratorCatalog, modelId: string): {
|
|
|
420
477
|
yearlyNet: number;
|
|
421
478
|
};
|
|
422
479
|
|
|
423
|
-
export { ACTIVATION_ORCHESTRATOR_TOKEN, BaseIpRateLimitGuard, ContinueRegistrationDto, PASSWORD_HASHER_TOKEN,
|
|
480
|
+
export { ACTIVATION_ORCHESTRATOR_TOKEN, BaseIpRateLimitGuard, ContinueRegistrationDto, PASSWORD_HASHER_TOKEN, PENDING_REGISTRATION_REPOSITORY_TOKEN, PLAN_CATALOG_LOOKUP_TOKEN, PendingRegistrationService, PreviewRegistrationPromoDto, type PromoEvaluation, REGISTRATION_AUDIT_LOGGER_TOKEN, REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN, REGISTRATION_CONFIG_TOKEN, REGISTRATION_OTP_DELIVERY_TOKEN, REGISTRATION_PROMO_PREVIEW_TOKEN, REGISTRATION_RESUME_BASE_URL_TOKEN, REGISTRATION_RESUME_DELIVERY_TOKEN, REGISTRATION_RESUME_TOKEN_SIGNER_TOKEN, RegisterStartDto, RegistrationBillingDetailsDto, RegistrationCleanupCron, RegistrationModule, type RegistrationModuleOptions, ResendRegistrationOtpDto, SLUG_AVAILABILITY_CHECK_TOKEN, SaveRegistrationConfigDto, SaveRegistrationConfigSelectionDto, SelectRegistrationPlanDto, StartRegistrationCheckoutDto, USER_ACCOUNT_LOOKUP_TOKEN, VerifyRegistrationOtpDto, computeBreakdown, generateOtpCode, hashOtpCode, resolveModel, slugify, verifyOtpCode };
|
|
@@ -4,11 +4,8 @@ import {
|
|
|
4
4
|
ContinueRegistrationDto,
|
|
5
5
|
CronExpression,
|
|
6
6
|
PASSWORD_HASHER_TOKEN,
|
|
7
|
-
PAYMENT_EVENT_LOG_TOKEN,
|
|
8
|
-
PAYMENT_PROVIDER_TOKEN,
|
|
9
7
|
PENDING_REGISTRATION_REPOSITORY_TOKEN,
|
|
10
8
|
PLAN_CATALOG_LOOKUP_TOKEN,
|
|
11
|
-
PaymentWebhookDto,
|
|
12
9
|
PendingRegistrationService,
|
|
13
10
|
PreviewRegistrationPromoDto,
|
|
14
11
|
REGISTRATION_AUDIT_LOGGER_TOKEN,
|
|
@@ -20,6 +17,7 @@ import {
|
|
|
20
17
|
REGISTRATION_RESUME_DELIVERY_TOKEN,
|
|
21
18
|
REGISTRATION_RESUME_TOKEN_SIGNER_TOKEN,
|
|
22
19
|
RegisterStartDto,
|
|
20
|
+
RegistrationBillingDetailsDto,
|
|
23
21
|
RegistrationCleanupCron,
|
|
24
22
|
RegistrationModule,
|
|
25
23
|
ResendRegistrationOtpDto,
|
|
@@ -36,9 +34,19 @@ import {
|
|
|
36
34
|
resolveModel,
|
|
37
35
|
slugify,
|
|
38
36
|
verifyOtpCode
|
|
39
|
-
} from "../chunk-
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
37
|
+
} from "../chunk-JBCC6C3M.js";
|
|
38
|
+
import "../chunk-55QEDAMX.js";
|
|
39
|
+
import "../chunk-3RLWML2S.js";
|
|
40
|
+
import "../chunk-NDLC5GYK.js";
|
|
41
|
+
import "../chunk-KPEMTBOP.js";
|
|
42
|
+
import "../chunk-TBBZWZQT.js";
|
|
43
|
+
import "../chunk-VBRYPU7V.js";
|
|
44
|
+
import "../chunk-6PJE7EWO.js";
|
|
45
|
+
import "../chunk-3QVGA6JX.js";
|
|
46
|
+
import "../chunk-7NJKVC5X.js";
|
|
47
|
+
import "../chunk-LF6J4YYN.js";
|
|
48
|
+
import "../chunk-FEQZCWUL.js";
|
|
49
|
+
import "../chunk-J7NJRK3K.js";
|
|
42
50
|
import "../chunk-SHUYVCID.js";
|
|
43
51
|
export {
|
|
44
52
|
ACTIVATION_ORCHESTRATOR_TOKEN,
|
|
@@ -46,11 +54,8 @@ export {
|
|
|
46
54
|
ContinueRegistrationDto,
|
|
47
55
|
CronExpression,
|
|
48
56
|
PASSWORD_HASHER_TOKEN,
|
|
49
|
-
PAYMENT_EVENT_LOG_TOKEN,
|
|
50
|
-
PAYMENT_PROVIDER_TOKEN,
|
|
51
57
|
PENDING_REGISTRATION_REPOSITORY_TOKEN,
|
|
52
58
|
PLAN_CATALOG_LOOKUP_TOKEN,
|
|
53
|
-
PaymentWebhookDto,
|
|
54
59
|
PendingRegistrationService,
|
|
55
60
|
PreviewRegistrationPromoDto,
|
|
56
61
|
REGISTRATION_AUDIT_LOGGER_TOKEN,
|
|
@@ -62,6 +67,7 @@ export {
|
|
|
62
67
|
REGISTRATION_RESUME_DELIVERY_TOKEN,
|
|
63
68
|
REGISTRATION_RESUME_TOKEN_SIGNER_TOKEN,
|
|
64
69
|
RegisterStartDto,
|
|
70
|
+
RegistrationBillingDetailsDto,
|
|
65
71
|
RegistrationCleanupCron,
|
|
66
72
|
RegistrationModule,
|
|
67
73
|
ResendRegistrationOtpDto,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export { S as SubscriberService } from '../subscriber.service-5W6Gi-1B.cjs';
|
|
2
|
+
import { Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
3
|
+
import { SubscriberRepository } from '@saasicat/core';
|
|
4
|
+
import { P as ProviderSpec } from '../di-CcNeq9v-.cjs';
|
|
5
|
+
|
|
6
|
+
interface SubscriberModuleOptions {
|
|
7
|
+
subscriberRepository: ProviderSpec<SubscriberRepository>;
|
|
8
|
+
/** Modules that provide dependencies used by the repository factory. */
|
|
9
|
+
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
10
|
+
extraProviders?: Provider[];
|
|
11
|
+
global?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* `SubscriberService` on its own. `SubscriptionContractModule` provides it as
|
|
15
|
+
* well, because a contract cannot be written without it; this module is for an
|
|
16
|
+
* application that creates tenants in a module of its own.
|
|
17
|
+
*
|
|
18
|
+
* Reads the customer number prefix from `PLAN_CATALOG_SETTINGS_TOKEN`, which
|
|
19
|
+
* `SaaSiCatModule.forRoot` provides globally.
|
|
20
|
+
*/
|
|
21
|
+
declare class SubscriberModule {
|
|
22
|
+
static forRoot(options: SubscriberModuleOptions): DynamicModule;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Repository for `subscribers`, their tenant links and their corrections. */
|
|
26
|
+
declare const SUBSCRIBER_REPOSITORY_TOKEN: unique symbol;
|
|
27
|
+
|
|
28
|
+
export { SUBSCRIBER_REPOSITORY_TOKEN, SubscriberModule, type SubscriberModuleOptions };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export { S as SubscriberService } from '../subscriber.service-5W6Gi-1B.js';
|
|
2
|
+
import { Type, DynamicModule, ForwardReference, Provider } from '@nestjs/common';
|
|
3
|
+
import { SubscriberRepository } from '@saasicat/core';
|
|
4
|
+
import { P as ProviderSpec } from '../di-CcNeq9v-.js';
|
|
5
|
+
|
|
6
|
+
interface SubscriberModuleOptions {
|
|
7
|
+
subscriberRepository: ProviderSpec<SubscriberRepository>;
|
|
8
|
+
/** Modules that provide dependencies used by the repository factory. */
|
|
9
|
+
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
10
|
+
extraProviders?: Provider[];
|
|
11
|
+
global?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* `SubscriberService` on its own. `SubscriptionContractModule` provides it as
|
|
15
|
+
* well, because a contract cannot be written without it; this module is for an
|
|
16
|
+
* application that creates tenants in a module of its own.
|
|
17
|
+
*
|
|
18
|
+
* Reads the customer number prefix from `PLAN_CATALOG_SETTINGS_TOKEN`, which
|
|
19
|
+
* `SaaSiCatModule.forRoot` provides globally.
|
|
20
|
+
*/
|
|
21
|
+
declare class SubscriberModule {
|
|
22
|
+
static forRoot(options: SubscriberModuleOptions): DynamicModule;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Repository for `subscribers`, their tenant links and their corrections. */
|
|
26
|
+
declare const SUBSCRIBER_REPOSITORY_TOKEN: unique symbol;
|
|
27
|
+
|
|
28
|
+
export { SUBSCRIBER_REPOSITORY_TOKEN, SubscriberModule, type SubscriberModuleOptions };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../chunk-DU56UKEH.js";
|
|
2
|
+
import {
|
|
3
|
+
SubscriberModule
|
|
4
|
+
} from "../chunk-WOEJ6K7M.js";
|
|
5
|
+
import {
|
|
6
|
+
SUBSCRIBER_REPOSITORY_TOKEN,
|
|
7
|
+
SubscriberService
|
|
8
|
+
} from "../chunk-LF6J4YYN.js";
|
|
9
|
+
import "../chunk-FEQZCWUL.js";
|
|
10
|
+
import "../chunk-J7NJRK3K.js";
|
|
11
|
+
import "../chunk-SHUYVCID.js";
|
|
12
|
+
export {
|
|
13
|
+
SUBSCRIBER_REPOSITORY_TOKEN,
|
|
14
|
+
SubscriberModule,
|
|
15
|
+
SubscriberService
|
|
16
|
+
};
|