@saasicat/nest 0.2.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.
Files changed (96) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +53 -0
  3. package/dist/admin/index.cjs +1283 -0
  4. package/dist/admin/index.d.cts +225 -0
  5. package/dist/admin/index.d.ts +225 -0
  6. package/dist/admin/index.js +58 -0
  7. package/dist/admin-audit.service-9IqXMlZm.d.cts +30 -0
  8. package/dist/admin-audit.service-9IqXMlZm.d.ts +30 -0
  9. package/dist/admin-manifest.config-DyrQNT7M.d.cts +10 -0
  10. package/dist/admin-manifest.config-DyrQNT7M.d.ts +10 -0
  11. package/dist/aggregation-CJ3qQf92.d.cts +288 -0
  12. package/dist/aggregation-Dvz9e8X2.d.ts +288 -0
  13. package/dist/billing/index.cjs +5205 -0
  14. package/dist/billing/index.d.cts +1326 -0
  15. package/dist/billing/index.d.ts +1326 -0
  16. package/dist/billing/index.js +197 -0
  17. package/dist/catalog/index.cjs +6449 -0
  18. package/dist/catalog/index.d.cts +1073 -0
  19. package/dist/catalog/index.d.ts +1073 -0
  20. package/dist/catalog/index.js +158 -0
  21. package/dist/checkout-offer/index.cjs +807 -0
  22. package/dist/checkout-offer/index.d.cts +120 -0
  23. package/dist/checkout-offer/index.d.ts +120 -0
  24. package/dist/checkout-offer/index.js +20 -0
  25. package/dist/chunk-2FR6ZL7R.js +0 -0
  26. package/dist/chunk-2PNX2QL2.js +347 -0
  27. package/dist/chunk-2VNZYRDV.js +326 -0
  28. package/dist/chunk-7MLGHWKO.js +12 -0
  29. package/dist/chunk-ABB2CRAS.js +31 -0
  30. package/dist/chunk-AJ3EPELS.js +157 -0
  31. package/dist/chunk-E56W4U2P.js +90 -0
  32. package/dist/chunk-HRU3CP57.js +71 -0
  33. package/dist/chunk-L4SUWH5B.js +14 -0
  34. package/dist/chunk-M6CZQYPY.js +314 -0
  35. package/dist/chunk-MDIZUVIK.js +87 -0
  36. package/dist/chunk-MV6LW5UB.js +217 -0
  37. package/dist/chunk-NYLON2VC.js +6 -0
  38. package/dist/chunk-P6MYZMXQ.js +951 -0
  39. package/dist/chunk-Q53N43LQ.js +13 -0
  40. package/dist/chunk-QJVPRD3R.js +573 -0
  41. package/dist/chunk-RIGLQ4BV.js +3367 -0
  42. package/dist/chunk-SABTXESR.js +24 -0
  43. package/dist/chunk-SHUYVCID.js +6 -0
  44. package/dist/chunk-SYEVGPFC.js +686 -0
  45. package/dist/chunk-V7HUZ6UQ.js +5923 -0
  46. package/dist/chunk-WPUVJRIN.js +29 -0
  47. package/dist/chunk-XCZ3TTFK.js +22 -0
  48. package/dist/chunk-XSGU2Y2O.js +1611 -0
  49. package/dist/chunk-YNEW3L63.js +190 -0
  50. package/dist/chunk-YXGHPILG.js +614 -0
  51. package/dist/chunk-ZL4LLE2Z.js +465 -0
  52. package/dist/di-CcNeq9v-.d.cts +16 -0
  53. package/dist/di-CcNeq9v-.d.ts +16 -0
  54. package/dist/discovery/index.cjs +588 -0
  55. package/dist/discovery/index.d.cts +299 -0
  56. package/dist/discovery/index.d.ts +299 -0
  57. package/dist/discovery/index.js +49 -0
  58. package/dist/discovery.scanner-CUYLKlYT.d.cts +59 -0
  59. package/dist/discovery.scanner-CUYLKlYT.d.ts +59 -0
  60. package/dist/entitlement/index.cjs +805 -0
  61. package/dist/entitlement/index.d.cts +60 -0
  62. package/dist/entitlement/index.d.ts +60 -0
  63. package/dist/entitlement/index.js +57 -0
  64. package/dist/index.cjs +15918 -0
  65. package/dist/index.d.cts +85 -0
  66. package/dist/index.d.ts +85 -0
  67. package/dist/index.js +956 -0
  68. package/dist/plan-resolution-CFCoUkrE.d.cts +41 -0
  69. package/dist/plan-resolution-CFCoUkrE.d.ts +41 -0
  70. package/dist/platform/index.cjs +2772 -0
  71. package/dist/platform/index.d.cts +118 -0
  72. package/dist/platform/index.d.ts +118 -0
  73. package/dist/platform/index.js +37 -0
  74. package/dist/promo/index.cjs +995 -0
  75. package/dist/promo/index.d.cts +121 -0
  76. package/dist/promo/index.d.ts +121 -0
  77. package/dist/promo/index.js +58 -0
  78. package/dist/registration/index.cjs +1687 -0
  79. package/dist/registration/index.d.cts +444 -0
  80. package/dist/registration/index.d.ts +444 -0
  81. package/dist/registration/index.js +82 -0
  82. package/dist/saas-platform.module-CgZ2omgg.d.cts +180 -0
  83. package/dist/saas-platform.module-DT9TnCzk.d.ts +180 -0
  84. package/dist/service-DX8KbGXl.d.cts +109 -0
  85. package/dist/service-DX8KbGXl.d.ts +109 -0
  86. package/dist/subscription-contract/index.cjs +471 -0
  87. package/dist/subscription-contract/index.d.cts +17 -0
  88. package/dist/subscription-contract/index.d.ts +17 -0
  89. package/dist/subscription-contract/index.js +21 -0
  90. package/dist/subscription-contract.service--cm47ZJJ.d.cts +39 -0
  91. package/dist/subscription-contract.service--cm47ZJJ.d.ts +39 -0
  92. package/dist/testing/index.cjs +3942 -0
  93. package/dist/testing/index.d.cts +279 -0
  94. package/dist/testing/index.d.ts +279 -0
  95. package/dist/testing/index.js +1195 -0
  96. package/package.json +185 -0
package/dist/index.js ADDED
@@ -0,0 +1,956 @@
1
+ import {
2
+ PreviewPromoCodeDto,
3
+ PromoCodeExpirer,
4
+ PromoCodePublicController,
5
+ PromoCodeRateLimitGuard,
6
+ PromoCodesModule,
7
+ hashIp,
8
+ ipFingerprint
9
+ } from "./chunk-2VNZYRDV.js";
10
+ import {
11
+ ACTIVATION_ORCHESTRATOR_TOKEN,
12
+ BaseIpRateLimitGuard,
13
+ ContinueRegistrationDto,
14
+ CronExpression,
15
+ PASSWORD_HASHER_TOKEN,
16
+ PAYMENT_EVENT_LOG_TOKEN,
17
+ PAYMENT_PROVIDER_TOKEN,
18
+ PENDING_REGISTRATION_REPOSITORY_TOKEN,
19
+ PLAN_CATALOG_LOOKUP_TOKEN,
20
+ PaymentWebhookDto,
21
+ PendingRegistrationService,
22
+ PreviewRegistrationPromoDto,
23
+ REGISTRATION_AUDIT_LOGGER_TOKEN,
24
+ REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN,
25
+ REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN,
26
+ REGISTRATION_CONFIG_TOKEN,
27
+ REGISTRATION_OTP_DELIVERY_TOKEN,
28
+ REGISTRATION_PROMO_PREVIEW_TOKEN,
29
+ REGISTRATION_RESUME_BASE_URL_TOKEN,
30
+ REGISTRATION_RESUME_DELIVERY_TOKEN,
31
+ REGISTRATION_RESUME_TOKEN_SIGNER_TOKEN,
32
+ RegisterStartDto,
33
+ RegistrationCleanupCron,
34
+ RegistrationModule,
35
+ ResendRegistrationOtpDto,
36
+ SLUG_AVAILABILITY_CHECK_TOKEN,
37
+ SaveRegistrationConfigDto,
38
+ SaveRegistrationConfigSelectionDto,
39
+ SelectRegistrationPlanDto,
40
+ StartRegistrationCheckoutDto,
41
+ USER_ACCOUNT_LOOKUP_TOKEN,
42
+ VerifyRegistrationOtpDto,
43
+ computeBreakdown,
44
+ generateOtpCode,
45
+ hashOtpCode,
46
+ resolveModel,
47
+ slugify,
48
+ verifyOtpCode
49
+ } from "./chunk-XSGU2Y2O.js";
50
+ import {
51
+ ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN,
52
+ AUDIT_STATS_PORT_TOKEN,
53
+ AdminStatsController,
54
+ AdminStatsModule,
55
+ AdminStatsService,
56
+ PROMO_CODE_STATS_PORT_TOKEN,
57
+ SUBSCRIPTION_STATS_PORT_TOKEN
58
+ } from "./chunk-YNEW3L63.js";
59
+ import {
60
+ CONTRACT_FREEZE_PORT_TOKEN,
61
+ CONTRACT_FREEZE_PROJECT_KEY_TOKEN,
62
+ CONTRACT_FREEZE_SOURCE_PORT_TOKEN,
63
+ CancelSubscriptionDto,
64
+ CatalogBundleUpsellResolver,
65
+ ChangePlanDto,
66
+ CompleteOnboardingSubscriptionDto,
67
+ ComposedTenantAuthGuard,
68
+ ConfiguratorCatalogBuilder,
69
+ FEATURE_GUARD_CONFIG_TOKEN,
70
+ FEATURE_UI_REGISTRY_TOKEN,
71
+ FeatureGuard,
72
+ LimitExceededFilter,
73
+ PLAN_CATALOG_IMPORT_SINK_TOKEN,
74
+ PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN,
75
+ PUBLIC_CATALOG_BUSINESS_TYPE_REPOSITORY_TOKEN,
76
+ PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN,
77
+ PUBLIC_CATALOG_PROJECT_KEY_TOKEN,
78
+ PendingPlanMaterializationService,
79
+ PlanCatalogImportDto,
80
+ PlanCatalogImporterModule,
81
+ PlanCatalogImporterService,
82
+ PlanCatalogValidationError,
83
+ PlanChangePreviewService,
84
+ PreviewPlanChangeDto,
85
+ PublicCatalogController,
86
+ PublicCatalogModule,
87
+ PublishValidationError,
88
+ SELF_SERVICE_BLOCKED_BUNDLES_TOKEN,
89
+ SELF_SERVICE_BLOCKED_PLANS_TOKEN,
90
+ SubscriptionBundleModule,
91
+ SubscriptionBundlePreviewService,
92
+ SubscriptionBundlesService,
93
+ SubscriptionContractFreezeService,
94
+ TenantAdminGuard,
95
+ TenantBillingController,
96
+ TenantBillingModule,
97
+ UPSELL_OFFER_CURRENCY_TOKEN,
98
+ UPSELL_OFFER_RESOLVER_TOKEN,
99
+ addMonths,
100
+ assertBaseVersionFresh,
101
+ assertChangeNote,
102
+ assertDraftPublishable,
103
+ assertOptimisticLockHeld,
104
+ buildPlanCatalogImporterController,
105
+ buildTenantSubscriptionBundlesController,
106
+ clearPendingPlanVersionFields,
107
+ computeCarriedTrialEndsAt,
108
+ computeNextPeriod,
109
+ computeProration,
110
+ decideRenewal,
111
+ initialPeriodWindow,
112
+ loadPlanCatalogFromFile,
113
+ loadPlanCatalogFromString,
114
+ periodEndAfter,
115
+ periodEndWithMinLead,
116
+ resolveBundleCancelEffectiveAt,
117
+ resolveBundlePriceNet
118
+ } from "./chunk-RIGLQ4BV.js";
119
+ import {
120
+ PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN,
121
+ PROMO_CODE_REPOSITORY_TOKEN,
122
+ PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN,
123
+ PROMO_FIRST_TIME_CUSTOMER_CHECK_TOKEN,
124
+ PROMO_REVENUE_DEDUCTION_AGGREGATOR_TOKEN,
125
+ PROMO_SERVICE_CONFIG_TOKEN,
126
+ PROMO_SUBSCRIPTION_LOOKUP_TOKEN,
127
+ PROMO_TRANSACTION_RUNNER_TOKEN,
128
+ PromoCodesService,
129
+ addCycles,
130
+ buildLabel,
131
+ computeDiscountGross,
132
+ computeDiscountedGross,
133
+ computeRegularStartsAt
134
+ } from "./chunk-ZL4LLE2Z.js";
135
+ import {
136
+ SubscriptionContractModule,
137
+ SubscriptionContractService,
138
+ contractLineItemToInvoiceLineItem,
139
+ sortContractLineItemsForInvoice,
140
+ subscriptionContractToInvoiceSnapshot
141
+ } from "./chunk-2PNX2QL2.js";
142
+ import {
143
+ ADVISORY_STRICT_MODE_CODES,
144
+ BundlesService,
145
+ BusinessTypeBundleInputDto,
146
+ BusinessTypesService,
147
+ CatalogEntriesService,
148
+ CatalogModule,
149
+ CreateBundleDto,
150
+ CreateBundleVersionDraftDto,
151
+ CreateBusinessTypeDto,
152
+ CreateBusinessTypeVersionDraftDto,
153
+ CreateMarketingProjectionDto,
154
+ CreatePlanDto,
155
+ CreatePlanVersionDraftDto,
156
+ CreatePromotionDto,
157
+ ListCatalogEntriesQueryDto,
158
+ ListMarketingProjectionsQueryDto,
159
+ ListMarketingSettingsQueryDto,
160
+ ListPromotionsQueryDto,
161
+ MarketingProjectionsService,
162
+ MarketingSettingsService,
163
+ PlanVersionsService,
164
+ PlansService,
165
+ PromotionsService,
166
+ PublicMarketingCatalogService,
167
+ PublishBundleVersionDto,
168
+ PublishBusinessTypeVersionDto,
169
+ PublishPlanVersionDto,
170
+ ReviewCatalogEntryDto,
171
+ SyncDiscoveryDto,
172
+ UpdateBundleDto,
173
+ UpdateBundleVersionDraftDto,
174
+ UpdateBusinessTypeDto,
175
+ UpdateBusinessTypeVersionDraftDto,
176
+ UpdateCatalogEntryI18nDto,
177
+ UpdateMarketingProjectionDto,
178
+ UpdateMarketingSettingsDto,
179
+ UpdatePlanDto,
180
+ UpdatePlanVersionDraftDto,
181
+ UpdatePromotionDto,
182
+ blockingStrictModeWarnings,
183
+ buildBundleVersionsController,
184
+ buildBundlesController,
185
+ buildBusinessTypeVersionsController,
186
+ buildBusinessTypesController,
187
+ buildCatalogEntriesController,
188
+ buildMarketingProjectionsController,
189
+ buildMarketingSettingsController,
190
+ buildPlanVersionsController,
191
+ buildPlansController,
192
+ buildPromotionsController,
193
+ buildPublicMarketingCatalogController,
194
+ featureApprovalSignature,
195
+ formatPreflightReport,
196
+ formatSeedGateReport,
197
+ loadApprovedCatalogKeys,
198
+ preflightExitCode,
199
+ quotaApprovalSignature,
200
+ runPreflight,
201
+ runSeedGateFromFile,
202
+ seedGateExitCode,
203
+ validateBundleDraft,
204
+ validateBusinessTypeDraft,
205
+ validatePlanDraft,
206
+ validateSeedAgainstSnapshot
207
+ } from "./chunk-V7HUZ6UQ.js";
208
+ import {
209
+ AUDIT_CONTEXT_RESOLVER_TOKEN,
210
+ PENDING_PLAN_QUERY_PORT_TOKEN,
211
+ SUBSCRIPTION_USAGE_PORT_TOKEN,
212
+ SUBSCRIPTION_WRITE_PORT_TOKEN,
213
+ TENANT_AUTH_GUARDS_TOKEN,
214
+ TENANT_ID_RESOLVER_TOKEN,
215
+ TRIAL_PROJECTION_PORT_TOKEN,
216
+ USAGE_SNAPSHOT_PORT_TOKEN,
217
+ USER_EMAIL_RESOLVER_TOKEN,
218
+ USER_ID_RESOLVER_TOKEN,
219
+ classifyBundleVersionDiff,
220
+ classifyPlanDiff
221
+ } from "./chunk-WPUVJRIN.js";
222
+ import {
223
+ CHECKOUT_OFFER_REPOSITORY_TOKEN,
224
+ CheckoutOfferModule,
225
+ CheckoutOfferService,
226
+ CreateCheckoutOfferDto,
227
+ UpdateCheckoutOfferDto,
228
+ buildCheckoutOfferController
229
+ } from "./chunk-SYEVGPFC.js";
230
+ import "./chunk-MDIZUVIK.js";
231
+ import {
232
+ DefinesQuota,
233
+ EnforceQuota,
234
+ ImplementsCapability,
235
+ RequiresCapability,
236
+ runHeadlessDiscoveryScan
237
+ } from "./chunk-HRU3CP57.js";
238
+ import {
239
+ DiscoverySnapshotNotFoundError,
240
+ loadDiscoverySnapshotFromFile
241
+ } from "./chunk-ABB2CRAS.js";
242
+ import "./chunk-2FR6ZL7R.js";
243
+ import {
244
+ ADMIN_MANIFEST_CONFIG,
245
+ AdminBypassRlsInterceptor,
246
+ AdminManifestModule,
247
+ AdminManifestService,
248
+ AdminModule,
249
+ AdminPublicBootController,
250
+ MfaGuard,
251
+ MfaService,
252
+ PLATFORM_CORE_CONTRIBUTION_TOKEN,
253
+ PLATFORM_CORE_MANIFEST_CONTRIBUTION,
254
+ REQUIRE_MFA_KEY,
255
+ RequireMfa,
256
+ SuperAdminGuard
257
+ } from "./chunk-P6MYZMXQ.js";
258
+ import {
259
+ REQUIRE_FEATURE_KEY,
260
+ RequireFeature
261
+ } from "./chunk-Q53N43LQ.js";
262
+ import {
263
+ AUDIT_PORT_TOKEN,
264
+ AdminAuditService,
265
+ MFA_PORT_TOKEN,
266
+ RLS_BYPASS_PORT_TOKEN
267
+ } from "./chunk-E56W4U2P.js";
268
+ import {
269
+ DiscoveryModule,
270
+ buildDiscoveryController
271
+ } from "./chunk-AJ3EPELS.js";
272
+ import {
273
+ DISCOVERY_APP_INFO_TOKEN,
274
+ DISCOVERY_SNAPSHOT_PATH_TOKEN,
275
+ DiscoveryScanner,
276
+ computeSnapshotHash
277
+ } from "./chunk-M6CZQYPY.js";
278
+ import {
279
+ EntitlementModule,
280
+ EntitlementService,
281
+ LimitExceededError,
282
+ SUBSCRIPTION_BUNDLE_CONFIG_TOKEN,
283
+ SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN,
284
+ aggregateBusinessTypeQuotas,
285
+ aggregateContractLineItemEntitlements,
286
+ aggregateLimits,
287
+ aggregateSubscriptionBundleQuotas,
288
+ applyCustomLimits,
289
+ buildReplacedByIndex,
290
+ collectBusinessTypeFeatures,
291
+ collectSubscriptionBundleFeatures,
292
+ expandReplacedFeatures,
293
+ filterActiveSubscriptionBundles,
294
+ filterPlannedOnlyFeatures,
295
+ hasAnyFeature,
296
+ hasFeature,
297
+ resolveEntitlementPlan,
298
+ toEffectiveLimitsSnapshot
299
+ } from "./chunk-YXGHPILG.js";
300
+ import {
301
+ PLAN_CATALOG_READ_SINK_TOKEN,
302
+ PLAN_CATALOG_TOKEN,
303
+ PlanCatalogModule,
304
+ buildPlanCatalogFromSnapshot,
305
+ computeIncludedVat,
306
+ findPlan,
307
+ getActiveFeatureKeys,
308
+ getMarketedPlans,
309
+ getPlanOrThrow,
310
+ getPlanPriceGross,
311
+ getPlanPriceNet,
312
+ getPlanQuota,
313
+ grossFromNet,
314
+ isFeatureInPlan,
315
+ isFeaturePlannedOnly,
316
+ round2
317
+ } from "./chunk-MV6LW5UB.js";
318
+ import {
319
+ SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN
320
+ } from "./chunk-NYLON2VC.js";
321
+ import {
322
+ ENTITLEMENT_RESOLUTION_CONFIG_TOKEN,
323
+ PLAN_VERSION_REPOSITORY_TOKEN,
324
+ SUBSCRIPTION_REPOSITORY_TOKEN,
325
+ TRANSACTION_RUNNER_TOKEN
326
+ } from "./chunk-7MLGHWKO.js";
327
+ import {
328
+ BUNDLE_REPOSITORY_TOKEN,
329
+ BUSINESS_TYPE_REPOSITORY_TOKEN,
330
+ CATALOG_ENTRY_REPOSITORY_TOKEN,
331
+ CATALOG_SERVICE_CONFIG_TOKEN,
332
+ MARKETING_PROJECTION_REPOSITORY_TOKEN,
333
+ MARKETING_SETTINGS_REPOSITORY_TOKEN,
334
+ PLAN_REPOSITORY_TOKEN,
335
+ PROMOTION_REPOSITORY_TOKEN
336
+ } from "./chunk-XCZ3TTFK.js";
337
+ import {
338
+ asProvider
339
+ } from "./chunk-SABTXESR.js";
340
+ import {
341
+ DEFINES_QUOTA_KEY,
342
+ DISCOVERY_SNAPSHOT_TOKEN,
343
+ ENFORCE_QUOTA_KEY,
344
+ IMPLEMENTS_CAPABILITY_KEY,
345
+ REQUIRES_CAPABILITY_KEY
346
+ } from "./chunk-L4SUWH5B.js";
347
+ import {
348
+ __name
349
+ } from "./chunk-SHUYVCID.js";
350
+
351
+ // src/setup/setup.module.ts
352
+ import { Module } from "@nestjs/common";
353
+
354
+ // src/setup/setup.controller.ts
355
+ import { Body, Controller, Get, Post } from "@nestjs/common";
356
+ import { IsEmail, IsNotEmpty, IsOptional, IsString, MinLength } from "class-validator";
357
+
358
+ // src/setup/setup.service.ts
359
+ import { BadRequestException, ConflictException, ForbiddenException, Inject, Injectable, UnauthorizedException } from "@nestjs/common";
360
+ import { isPlatformUserExistsError, SETUP_ERROR_CODES } from "@saasicat/types";
361
+ import { randomBytes, timingSafeEqual } from "crypto";
362
+ import QRCode from "qrcode";
363
+
364
+ // src/setup/tokens.ts
365
+ var SETUP_PROVISIONING_PORT_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/SetupProvisioningPort");
366
+ var SETUP_CONFIG_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/SetupConfig");
367
+
368
+ // src/setup/setup.service.ts
369
+ function _ts_decorate(decorators, target, key, desc) {
370
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
371
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
372
+ 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;
373
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
374
+ }
375
+ __name(_ts_decorate, "_ts_decorate");
376
+ function _ts_metadata(k, v) {
377
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
378
+ }
379
+ __name(_ts_metadata, "_ts_metadata");
380
+ function _ts_param(paramIndex, decorator) {
381
+ return function(target, key) {
382
+ decorator(target, key, paramIndex);
383
+ };
384
+ }
385
+ __name(_ts_param, "_ts_param");
386
+ var GENERATED_PASSWORD_BYTES = 12;
387
+ function timingSafeEqualStr(a, b) {
388
+ const ab = Buffer.from(a, "utf8");
389
+ const bb = Buffer.from(b, "utf8");
390
+ if (ab.length !== bb.length) return false;
391
+ return timingSafeEqual(ab, bb);
392
+ }
393
+ __name(timingSafeEqualStr, "timingSafeEqualStr");
394
+ var SetupService = class {
395
+ static {
396
+ __name(this, "SetupService");
397
+ }
398
+ users;
399
+ config;
400
+ mfa;
401
+ constructor(users, config, mfa) {
402
+ this.users = users;
403
+ this.config = config;
404
+ this.mfa = mfa;
405
+ }
406
+ async status() {
407
+ return {
408
+ needsSetup: await this.users.countSuperAdmins() === 0
409
+ };
410
+ }
411
+ async setup(req) {
412
+ this.assertToken(req.token);
413
+ await this.assertNoSuperAdmin();
414
+ const email = req.email.trim().toLowerCase();
415
+ if (!email.includes("@")) {
416
+ throw new BadRequestException({
417
+ code: SETUP_ERROR_CODES.INVALID_EMAIL
418
+ });
419
+ }
420
+ const generated = !req.password;
421
+ const password = req.password ?? randomBytes(GENERATED_PASSWORD_BYTES).toString("base64url");
422
+ let user;
423
+ try {
424
+ user = await this.users.createSuperAdmin({
425
+ email,
426
+ password
427
+ });
428
+ } catch (err) {
429
+ if (isPlatformUserExistsError(err)) {
430
+ throw new ConflictException({
431
+ code: SETUP_ERROR_CODES.EMAIL_EXISTS,
432
+ message: err.message
433
+ });
434
+ }
435
+ throw err;
436
+ }
437
+ const totp = await this.mfa.setup(user.id, user.email, this.config.mfaIssuer);
438
+ const qrDataUrl = await QRCode.toDataURL(totp.otpauthUri, {
439
+ width: 220,
440
+ margin: 1
441
+ });
442
+ return {
443
+ userId: user.id,
444
+ email: user.email,
445
+ otpauthUri: totp.otpauthUri,
446
+ qrDataUrl,
447
+ secret: totp.secret,
448
+ ...generated ? {
449
+ generatedPassword: password
450
+ } : {}
451
+ };
452
+ }
453
+ async confirmMfa(req) {
454
+ this.assertToken(req.token);
455
+ const ok = await this.mfa.verify({
456
+ userId: req.userId,
457
+ code: req.code
458
+ });
459
+ return {
460
+ ok
461
+ };
462
+ }
463
+ assertToken(token) {
464
+ const expected = process.env[this.config.setupTokenEnvVar]?.trim();
465
+ if (!expected) {
466
+ throw new ForbiddenException({
467
+ code: SETUP_ERROR_CODES.SETUP_DISABLED,
468
+ message: `${this.config.setupTokenEnvVar} ist nicht gesetzt \u2014 Setup ist deaktiviert.`
469
+ });
470
+ }
471
+ if (!token || !timingSafeEqualStr(token, expected)) {
472
+ throw new UnauthorizedException({
473
+ code: SETUP_ERROR_CODES.INVALID_SETUP_TOKEN
474
+ });
475
+ }
476
+ }
477
+ async assertNoSuperAdmin() {
478
+ if (await this.users.countSuperAdmins() > 0) {
479
+ throw new ConflictException({
480
+ code: SETUP_ERROR_CODES.SETUP_ALREADY_DONE
481
+ });
482
+ }
483
+ }
484
+ };
485
+ SetupService = _ts_decorate([
486
+ Injectable(),
487
+ _ts_param(0, Inject(SETUP_PROVISIONING_PORT_TOKEN)),
488
+ _ts_param(1, Inject(SETUP_CONFIG_TOKEN)),
489
+ _ts_metadata("design:type", Function),
490
+ _ts_metadata("design:paramtypes", [
491
+ typeof SuperAdminProvisioningPort === "undefined" ? Object : SuperAdminProvisioningPort,
492
+ typeof SetupConfig === "undefined" ? Object : SetupConfig,
493
+ typeof MfaService === "undefined" ? Object : MfaService
494
+ ])
495
+ ], SetupService);
496
+
497
+ // src/setup/setup.controller.ts
498
+ function _ts_decorate2(decorators, target, key, desc) {
499
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
500
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
501
+ 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;
502
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
503
+ }
504
+ __name(_ts_decorate2, "_ts_decorate");
505
+ function _ts_metadata2(k, v) {
506
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
507
+ }
508
+ __name(_ts_metadata2, "_ts_metadata");
509
+ function _ts_param2(paramIndex, decorator) {
510
+ return function(target, key) {
511
+ decorator(target, key, paramIndex);
512
+ };
513
+ }
514
+ __name(_ts_param2, "_ts_param");
515
+ var SetupDto = class SetupDto2 {
516
+ static {
517
+ __name(this, "SetupDto");
518
+ }
519
+ token;
520
+ email;
521
+ password;
522
+ };
523
+ _ts_decorate2([
524
+ IsString(),
525
+ IsNotEmpty(),
526
+ _ts_metadata2("design:type", String)
527
+ ], SetupDto.prototype, "token", void 0);
528
+ _ts_decorate2([
529
+ IsEmail(),
530
+ _ts_metadata2("design:type", String)
531
+ ], SetupDto.prototype, "email", void 0);
532
+ _ts_decorate2([
533
+ IsOptional(),
534
+ IsString(),
535
+ MinLength(8),
536
+ _ts_metadata2("design:type", String)
537
+ ], SetupDto.prototype, "password", void 0);
538
+ var SetupConfirmMfaDto = class SetupConfirmMfaDto2 {
539
+ static {
540
+ __name(this, "SetupConfirmMfaDto");
541
+ }
542
+ token;
543
+ userId;
544
+ code;
545
+ };
546
+ _ts_decorate2([
547
+ IsString(),
548
+ IsNotEmpty(),
549
+ _ts_metadata2("design:type", String)
550
+ ], SetupConfirmMfaDto.prototype, "token", void 0);
551
+ _ts_decorate2([
552
+ IsString(),
553
+ IsNotEmpty(),
554
+ _ts_metadata2("design:type", String)
555
+ ], SetupConfirmMfaDto.prototype, "userId", void 0);
556
+ _ts_decorate2([
557
+ IsString(),
558
+ IsNotEmpty(),
559
+ _ts_metadata2("design:type", String)
560
+ ], SetupConfirmMfaDto.prototype, "code", void 0);
561
+ var SetupController = class {
562
+ static {
563
+ __name(this, "SetupController");
564
+ }
565
+ setup;
566
+ constructor(setup) {
567
+ this.setup = setup;
568
+ }
569
+ status() {
570
+ return this.setup.status();
571
+ }
572
+ run(dto) {
573
+ return this.setup.setup(dto);
574
+ }
575
+ confirm(dto) {
576
+ return this.setup.confirmMfa(dto);
577
+ }
578
+ };
579
+ _ts_decorate2([
580
+ Get("status"),
581
+ _ts_metadata2("design:type", Function),
582
+ _ts_metadata2("design:paramtypes", []),
583
+ _ts_metadata2("design:returntype", typeof Promise === "undefined" ? Object : Promise)
584
+ ], SetupController.prototype, "status", null);
585
+ _ts_decorate2([
586
+ Post(),
587
+ _ts_param2(0, Body()),
588
+ _ts_metadata2("design:type", Function),
589
+ _ts_metadata2("design:paramtypes", [
590
+ typeof SetupDto === "undefined" ? Object : SetupDto
591
+ ]),
592
+ _ts_metadata2("design:returntype", typeof Promise === "undefined" ? Object : Promise)
593
+ ], SetupController.prototype, "run", null);
594
+ _ts_decorate2([
595
+ Post("confirm-mfa"),
596
+ _ts_param2(0, Body()),
597
+ _ts_metadata2("design:type", Function),
598
+ _ts_metadata2("design:paramtypes", [
599
+ typeof SetupConfirmMfaDto === "undefined" ? Object : SetupConfirmMfaDto
600
+ ]),
601
+ _ts_metadata2("design:returntype", typeof Promise === "undefined" ? Object : Promise)
602
+ ], SetupController.prototype, "confirm", null);
603
+ SetupController = _ts_decorate2([
604
+ Controller("admin/setup"),
605
+ _ts_metadata2("design:type", Function),
606
+ _ts_metadata2("design:paramtypes", [
607
+ typeof SetupService === "undefined" ? Object : SetupService
608
+ ])
609
+ ], SetupController);
610
+
611
+ // src/setup/setup.module.ts
612
+ function _ts_decorate3(decorators, target, key, desc) {
613
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
614
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
615
+ 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;
616
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
617
+ }
618
+ __name(_ts_decorate3, "_ts_decorate");
619
+ var DEFAULT_SETUP_TOKEN_ENV_VAR = "SETUP_TOKEN";
620
+ var DEFAULT_MFA_ISSUER = "SuperAdmin";
621
+ var SetupModule = class _SetupModule {
622
+ static {
623
+ __name(this, "SetupModule");
624
+ }
625
+ static forRoot(options) {
626
+ return {
627
+ module: _SetupModule,
628
+ global: options.global ?? false,
629
+ controllers: [
630
+ SetupController
631
+ ],
632
+ providers: [
633
+ asProvider(SETUP_PROVISIONING_PORT_TOKEN, options.provisioningPort),
634
+ {
635
+ provide: SETUP_CONFIG_TOKEN,
636
+ useValue: {
637
+ setupTokenEnvVar: options.setupTokenEnvVar ?? DEFAULT_SETUP_TOKEN_ENV_VAR,
638
+ mfaIssuer: options.mfaIssuer ?? DEFAULT_MFA_ISSUER
639
+ }
640
+ },
641
+ SetupService
642
+ ],
643
+ exports: [
644
+ SetupService
645
+ ]
646
+ };
647
+ }
648
+ };
649
+ SetupModule = _ts_decorate3([
650
+ Module({})
651
+ ], SetupModule);
652
+ export {
653
+ ACTIVATION_ORCHESTRATOR_TOKEN,
654
+ ADMIN_MANIFEST_CONFIG,
655
+ ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN,
656
+ ADVISORY_STRICT_MODE_CODES,
657
+ AUDIT_CONTEXT_RESOLVER_TOKEN,
658
+ AUDIT_PORT_TOKEN,
659
+ AUDIT_STATS_PORT_TOKEN,
660
+ AdminAuditService,
661
+ AdminBypassRlsInterceptor,
662
+ AdminManifestModule,
663
+ AdminManifestService,
664
+ AdminModule,
665
+ AdminPublicBootController,
666
+ AdminStatsController,
667
+ AdminStatsModule,
668
+ AdminStatsService,
669
+ BUNDLE_REPOSITORY_TOKEN,
670
+ BUSINESS_TYPE_REPOSITORY_TOKEN,
671
+ BaseIpRateLimitGuard,
672
+ BundlesService,
673
+ BusinessTypeBundleInputDto,
674
+ BusinessTypesService,
675
+ CATALOG_ENTRY_REPOSITORY_TOKEN,
676
+ CATALOG_SERVICE_CONFIG_TOKEN,
677
+ CHECKOUT_OFFER_REPOSITORY_TOKEN,
678
+ CONTRACT_FREEZE_PORT_TOKEN,
679
+ CONTRACT_FREEZE_PROJECT_KEY_TOKEN,
680
+ CONTRACT_FREEZE_SOURCE_PORT_TOKEN,
681
+ CancelSubscriptionDto,
682
+ CatalogBundleUpsellResolver,
683
+ CatalogEntriesService,
684
+ CatalogModule,
685
+ ChangePlanDto,
686
+ CheckoutOfferModule,
687
+ CheckoutOfferService,
688
+ CompleteOnboardingSubscriptionDto,
689
+ ComposedTenantAuthGuard,
690
+ ConfiguratorCatalogBuilder,
691
+ ContinueRegistrationDto,
692
+ CreateBundleDto,
693
+ CreateBundleVersionDraftDto,
694
+ CreateBusinessTypeDto,
695
+ CreateBusinessTypeVersionDraftDto,
696
+ CreateCheckoutOfferDto,
697
+ CreateMarketingProjectionDto,
698
+ CreatePlanDto,
699
+ CreatePlanVersionDraftDto,
700
+ CreatePromotionDto,
701
+ CronExpression,
702
+ DEFINES_QUOTA_KEY,
703
+ DISCOVERY_APP_INFO_TOKEN,
704
+ DISCOVERY_SNAPSHOT_PATH_TOKEN,
705
+ DISCOVERY_SNAPSHOT_TOKEN,
706
+ DefinesQuota,
707
+ DiscoveryModule,
708
+ DiscoveryScanner,
709
+ DiscoverySnapshotNotFoundError,
710
+ ENFORCE_QUOTA_KEY,
711
+ ENTITLEMENT_RESOLUTION_CONFIG_TOKEN,
712
+ EnforceQuota,
713
+ EntitlementModule,
714
+ EntitlementService,
715
+ FEATURE_GUARD_CONFIG_TOKEN,
716
+ FEATURE_UI_REGISTRY_TOKEN,
717
+ FeatureGuard,
718
+ IMPLEMENTS_CAPABILITY_KEY,
719
+ ImplementsCapability,
720
+ LimitExceededError,
721
+ LimitExceededFilter,
722
+ ListCatalogEntriesQueryDto,
723
+ ListMarketingProjectionsQueryDto,
724
+ ListMarketingSettingsQueryDto,
725
+ ListPromotionsQueryDto,
726
+ MARKETING_PROJECTION_REPOSITORY_TOKEN,
727
+ MARKETING_SETTINGS_REPOSITORY_TOKEN,
728
+ MFA_PORT_TOKEN,
729
+ MarketingProjectionsService,
730
+ MarketingSettingsService,
731
+ MfaGuard,
732
+ MfaService,
733
+ PASSWORD_HASHER_TOKEN,
734
+ PAYMENT_EVENT_LOG_TOKEN,
735
+ PAYMENT_PROVIDER_TOKEN,
736
+ PENDING_PLAN_QUERY_PORT_TOKEN,
737
+ PENDING_REGISTRATION_REPOSITORY_TOKEN,
738
+ PLAN_CATALOG_IMPORT_SINK_TOKEN,
739
+ PLAN_CATALOG_LOOKUP_TOKEN,
740
+ PLAN_CATALOG_READ_SINK_TOKEN,
741
+ PLAN_CATALOG_TOKEN,
742
+ PLAN_REPOSITORY_TOKEN,
743
+ PLAN_VERSION_REPOSITORY_TOKEN,
744
+ PLATFORM_CORE_CONTRIBUTION_TOKEN,
745
+ PLATFORM_CORE_MANIFEST_CONTRIBUTION,
746
+ PROMOTION_REPOSITORY_TOKEN,
747
+ PROMO_CODE_REDEMPTION_REPOSITORY_TOKEN,
748
+ PROMO_CODE_REPOSITORY_TOKEN,
749
+ PROMO_CODE_STATS_PORT_TOKEN,
750
+ PROMO_CODE_VALIDATION_LOG_REPOSITORY_TOKEN,
751
+ PROMO_FIRST_TIME_CUSTOMER_CHECK_TOKEN,
752
+ PROMO_REVENUE_DEDUCTION_AGGREGATOR_TOKEN,
753
+ PROMO_SERVICE_CONFIG_TOKEN,
754
+ PROMO_SUBSCRIPTION_LOOKUP_TOKEN,
755
+ PROMO_TRANSACTION_RUNNER_TOKEN,
756
+ PUBLIC_CATALOG_BUNDLE_REPOSITORY_TOKEN,
757
+ PUBLIC_CATALOG_BUSINESS_TYPE_REPOSITORY_TOKEN,
758
+ PUBLIC_CATALOG_MARKETING_REPOSITORY_TOKEN,
759
+ PUBLIC_CATALOG_PROJECT_KEY_TOKEN,
760
+ PaymentWebhookDto,
761
+ PendingPlanMaterializationService,
762
+ PendingRegistrationService,
763
+ PlanCatalogImportDto,
764
+ PlanCatalogImporterModule,
765
+ PlanCatalogImporterService,
766
+ PlanCatalogModule,
767
+ PlanCatalogValidationError,
768
+ PlanChangePreviewService,
769
+ PlanVersionsService,
770
+ PlansService,
771
+ PreviewPlanChangeDto,
772
+ PreviewPromoCodeDto,
773
+ PreviewRegistrationPromoDto,
774
+ PromoCodeExpirer,
775
+ PromoCodePublicController,
776
+ PromoCodeRateLimitGuard,
777
+ PromoCodesModule,
778
+ PromoCodesService,
779
+ PromotionsService,
780
+ PublicCatalogController,
781
+ PublicCatalogModule,
782
+ PublicMarketingCatalogService,
783
+ PublishBundleVersionDto,
784
+ PublishBusinessTypeVersionDto,
785
+ PublishPlanVersionDto,
786
+ PublishValidationError,
787
+ REGISTRATION_AUDIT_LOGGER_TOKEN,
788
+ REGISTRATION_BUSINESS_TYPE_LOOKUP_TOKEN,
789
+ REGISTRATION_CONFIGURATOR_LOOKUP_TOKEN,
790
+ REGISTRATION_CONFIG_TOKEN,
791
+ REGISTRATION_OTP_DELIVERY_TOKEN,
792
+ REGISTRATION_PROMO_PREVIEW_TOKEN,
793
+ REGISTRATION_RESUME_BASE_URL_TOKEN,
794
+ REGISTRATION_RESUME_DELIVERY_TOKEN,
795
+ REGISTRATION_RESUME_TOKEN_SIGNER_TOKEN,
796
+ REQUIRES_CAPABILITY_KEY,
797
+ REQUIRE_FEATURE_KEY,
798
+ REQUIRE_MFA_KEY,
799
+ RLS_BYPASS_PORT_TOKEN,
800
+ RegisterStartDto,
801
+ RegistrationCleanupCron,
802
+ RegistrationModule,
803
+ RequireFeature,
804
+ RequireMfa,
805
+ RequiresCapability,
806
+ ResendRegistrationOtpDto,
807
+ ReviewCatalogEntryDto,
808
+ SELF_SERVICE_BLOCKED_BUNDLES_TOKEN,
809
+ SELF_SERVICE_BLOCKED_PLANS_TOKEN,
810
+ SETUP_CONFIG_TOKEN,
811
+ SETUP_PROVISIONING_PORT_TOKEN,
812
+ SLUG_AVAILABILITY_CHECK_TOKEN,
813
+ SUBSCRIPTION_BUNDLE_CONFIG_TOKEN,
814
+ SUBSCRIPTION_BUNDLE_REPOSITORY_TOKEN,
815
+ SUBSCRIPTION_CONTRACT_REPOSITORY_TOKEN,
816
+ SUBSCRIPTION_REPOSITORY_TOKEN,
817
+ SUBSCRIPTION_STATS_PORT_TOKEN,
818
+ SUBSCRIPTION_USAGE_PORT_TOKEN,
819
+ SUBSCRIPTION_WRITE_PORT_TOKEN,
820
+ SaveRegistrationConfigDto,
821
+ SaveRegistrationConfigSelectionDto,
822
+ SelectRegistrationPlanDto,
823
+ SetupController,
824
+ SetupModule,
825
+ SetupService,
826
+ StartRegistrationCheckoutDto,
827
+ SubscriptionBundleModule,
828
+ SubscriptionBundlePreviewService,
829
+ SubscriptionBundlesService,
830
+ SubscriptionContractFreezeService,
831
+ SubscriptionContractModule,
832
+ SubscriptionContractService,
833
+ SuperAdminGuard,
834
+ SyncDiscoveryDto,
835
+ TENANT_AUTH_GUARDS_TOKEN,
836
+ TENANT_ID_RESOLVER_TOKEN,
837
+ TRANSACTION_RUNNER_TOKEN,
838
+ TRIAL_PROJECTION_PORT_TOKEN,
839
+ TenantAdminGuard,
840
+ TenantBillingController,
841
+ TenantBillingModule,
842
+ UPSELL_OFFER_CURRENCY_TOKEN,
843
+ UPSELL_OFFER_RESOLVER_TOKEN,
844
+ USAGE_SNAPSHOT_PORT_TOKEN,
845
+ USER_ACCOUNT_LOOKUP_TOKEN,
846
+ USER_EMAIL_RESOLVER_TOKEN,
847
+ USER_ID_RESOLVER_TOKEN,
848
+ UpdateBundleDto,
849
+ UpdateBundleVersionDraftDto,
850
+ UpdateBusinessTypeDto,
851
+ UpdateBusinessTypeVersionDraftDto,
852
+ UpdateCatalogEntryI18nDto,
853
+ UpdateCheckoutOfferDto,
854
+ UpdateMarketingProjectionDto,
855
+ UpdateMarketingSettingsDto,
856
+ UpdatePlanDto,
857
+ UpdatePlanVersionDraftDto,
858
+ UpdatePromotionDto,
859
+ VerifyRegistrationOtpDto,
860
+ addCycles,
861
+ addMonths,
862
+ aggregateBusinessTypeQuotas,
863
+ aggregateContractLineItemEntitlements,
864
+ aggregateLimits,
865
+ aggregateSubscriptionBundleQuotas,
866
+ applyCustomLimits,
867
+ asProvider,
868
+ assertBaseVersionFresh,
869
+ assertChangeNote,
870
+ assertDraftPublishable,
871
+ assertOptimisticLockHeld,
872
+ blockingStrictModeWarnings,
873
+ buildBundleVersionsController,
874
+ buildBundlesController,
875
+ buildBusinessTypeVersionsController,
876
+ buildBusinessTypesController,
877
+ buildCatalogEntriesController,
878
+ buildCheckoutOfferController,
879
+ buildDiscoveryController,
880
+ buildLabel,
881
+ buildMarketingProjectionsController,
882
+ buildMarketingSettingsController,
883
+ buildPlanCatalogFromSnapshot,
884
+ buildPlanCatalogImporterController,
885
+ buildPlanVersionsController,
886
+ buildPlansController,
887
+ buildPromotionsController,
888
+ buildPublicMarketingCatalogController,
889
+ buildReplacedByIndex,
890
+ buildTenantSubscriptionBundlesController,
891
+ classifyBundleVersionDiff,
892
+ classifyPlanDiff,
893
+ clearPendingPlanVersionFields,
894
+ collectBusinessTypeFeatures,
895
+ collectSubscriptionBundleFeatures,
896
+ computeBreakdown,
897
+ computeCarriedTrialEndsAt,
898
+ computeDiscountGross,
899
+ computeDiscountedGross,
900
+ computeIncludedVat,
901
+ computeNextPeriod,
902
+ computeProration,
903
+ computeRegularStartsAt,
904
+ computeSnapshotHash,
905
+ contractLineItemToInvoiceLineItem,
906
+ decideRenewal,
907
+ expandReplacedFeatures,
908
+ featureApprovalSignature,
909
+ filterActiveSubscriptionBundles,
910
+ filterPlannedOnlyFeatures,
911
+ findPlan,
912
+ formatPreflightReport,
913
+ formatSeedGateReport,
914
+ generateOtpCode,
915
+ getActiveFeatureKeys,
916
+ getMarketedPlans,
917
+ getPlanOrThrow,
918
+ getPlanPriceGross,
919
+ getPlanPriceNet,
920
+ getPlanQuota,
921
+ grossFromNet,
922
+ hasAnyFeature,
923
+ hasFeature,
924
+ hashIp,
925
+ hashOtpCode,
926
+ initialPeriodWindow,
927
+ ipFingerprint,
928
+ isFeatureInPlan,
929
+ isFeaturePlannedOnly,
930
+ loadApprovedCatalogKeys,
931
+ loadDiscoverySnapshotFromFile,
932
+ loadPlanCatalogFromFile,
933
+ loadPlanCatalogFromString,
934
+ periodEndAfter,
935
+ periodEndWithMinLead,
936
+ preflightExitCode,
937
+ quotaApprovalSignature,
938
+ resolveBundleCancelEffectiveAt,
939
+ resolveBundlePriceNet,
940
+ resolveEntitlementPlan,
941
+ resolveModel,
942
+ round2,
943
+ runHeadlessDiscoveryScan,
944
+ runPreflight,
945
+ runSeedGateFromFile,
946
+ seedGateExitCode,
947
+ slugify,
948
+ sortContractLineItemsForInvoice,
949
+ subscriptionContractToInvoiceSnapshot,
950
+ toEffectiveLimitsSnapshot,
951
+ validateBundleDraft,
952
+ validateBusinessTypeDraft,
953
+ validatePlanDraft,
954
+ validateSeedAgainstSnapshot,
955
+ verifyOtpCode
956
+ };