@saasicat/nest 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/index.cjs +3 -8
- package/dist/admin/index.d.cts +5 -33
- package/dist/admin/index.d.ts +5 -33
- package/dist/admin/index.js +2 -2
- package/dist/{admin-manifest.config-DxTfZ8-L.d.cts → admin-manifest.config-DyrQNT7M.d.cts} +1 -1
- package/dist/{admin-manifest.config-DxTfZ8-L.d.ts → admin-manifest.config-DyrQNT7M.d.ts} +1 -1
- package/dist/admin-manifest.service-Cp6uwvmt.d.cts +33 -0
- package/dist/admin-manifest.service-UGgzR1x-.d.ts +33 -0
- package/dist/{aggregation-DGCyoN5d.d.ts → aggregation-BibpEO0t.d.ts} +6 -59
- package/dist/{aggregation-Bt1i_whS.d.cts → aggregation-CfI0bOsQ.d.cts} +6 -59
- package/dist/billing/index.cjs +18 -106
- package/dist/billing/index.d.cts +8 -30
- package/dist/billing/index.d.ts +8 -30
- package/dist/billing/index.js +12 -14
- package/dist/catalog/index.cjs +1160 -1985
- package/dist/catalog/index.d.cts +9 -124
- package/dist/catalog/index.d.ts +9 -124
- package/dist/catalog/index.js +5 -27
- package/dist/checkout-offer/index.js +2 -2
- package/dist/{chunk-2VNZYRDV.js → chunk-52UTQRD3.js} +1 -1
- package/dist/{chunk-FN65XZKH.js → chunk-5DDCSGZC.js} +1110 -1923
- package/dist/{chunk-VHEHZMHB.js → chunk-BTL66TR6.js} +22 -75
- package/dist/{chunk-XSGU2Y2O.js → chunk-CK54YKVK.js} +2 -33
- package/dist/{chunk-SG34XT7J.js → chunk-FSGBRFLX.js} +18 -10
- package/dist/{chunk-SYEVGPFC.js → chunk-K3OPNVFR.js} +1 -1
- package/dist/{chunk-XCZ3TTFK.js → chunk-N3WANKSA.js} +0 -2
- package/dist/{chunk-K42EQPBB.js → chunk-ND7OOKOG.js} +18 -51
- package/dist/{chunk-MV6LW5UB.js → chunk-R2QOSVAA.js} +2 -2
- package/dist/{chunk-YNEW3L63.js → chunk-SD3TT2BR.js} +1 -1
- package/dist/{chunk-P6MYZMXQ.js → chunk-U6HT27J7.js} +3 -8
- package/dist/{chunk-7MLGHWKO.js → chunk-WKVBNTYC.js} +2 -0
- package/dist/{chunk-ZL4LLE2Z.js → chunk-ZLUGQE5D.js} +1 -1
- package/dist/discovery/index.js +4 -4
- package/dist/{enforce-quota.interceptor-3HmbeHTM.d.ts → enforce-quota.interceptor-Dj1Kusr5.d.ts} +9 -4
- package/dist/{enforce-quota.interceptor-HmdZFg41.d.cts → enforce-quota.interceptor-cv7r80VM.d.cts} +9 -4
- package/dist/entitlement/index.cjs +13 -46
- package/dist/entitlement/index.d.cts +4 -3
- package/dist/entitlement/index.d.ts +4 -3
- package/dist/entitlement/index.js +7 -9
- package/dist/index.cjs +1348 -2300
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +85 -113
- package/dist/platform/index.cjs +28 -54
- package/dist/platform/index.d.cts +4 -3
- package/dist/platform/index.d.ts +4 -3
- package/dist/platform/index.js +10 -7
- package/dist/promo/index.cjs +2 -2
- package/dist/promo/index.js +3 -3
- package/dist/registration/index.cjs +2 -34
- package/dist/registration/index.d.cts +3 -21
- package/dist/registration/index.d.ts +3 -21
- package/dist/registration/index.js +1 -3
- package/dist/testing/index.cjs +26 -255
- package/dist/testing/index.d.cts +5 -37
- package/dist/testing/index.d.ts +5 -37
- package/dist/testing/index.js +7 -207
- package/package.json +3 -3
|
@@ -5,22 +5,21 @@ import {
|
|
|
5
5
|
classifyBundleVersionDiff,
|
|
6
6
|
classifyPlanDiff
|
|
7
7
|
} from "./chunk-WPUVJRIN.js";
|
|
8
|
-
import {
|
|
9
|
-
AdminAuditService
|
|
10
|
-
} from "./chunk-E56W4U2P.js";
|
|
11
8
|
import {
|
|
12
9
|
DiscoverySnapshotNotFoundError,
|
|
13
10
|
loadDiscoverySnapshotFromFile
|
|
14
11
|
} from "./chunk-ABB2CRAS.js";
|
|
12
|
+
import {
|
|
13
|
+
AdminAuditService
|
|
14
|
+
} from "./chunk-E56W4U2P.js";
|
|
15
15
|
import {
|
|
16
16
|
DiscoveryScanner
|
|
17
17
|
} from "./chunk-M6CZQYPY.js";
|
|
18
18
|
import {
|
|
19
19
|
SUBSCRIPTION_REPOSITORY_TOKEN
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WKVBNTYC.js";
|
|
21
21
|
import {
|
|
22
22
|
BUNDLE_REPOSITORY_TOKEN,
|
|
23
|
-
BUSINESS_TYPE_REPOSITORY_TOKEN,
|
|
24
23
|
CATALOG_ENTRY_REPOSITORY_TOKEN,
|
|
25
24
|
CATALOG_SERVICE_CONFIG_TOKEN,
|
|
26
25
|
FEATURE_UI_REGISTRY_TOKEN,
|
|
@@ -28,13 +27,13 @@ import {
|
|
|
28
27
|
MARKETING_SETTINGS_REPOSITORY_TOKEN,
|
|
29
28
|
PLAN_REPOSITORY_TOKEN,
|
|
30
29
|
PROMOTION_REPOSITORY_TOKEN
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import {
|
|
33
|
-
DISCOVERY_SNAPSHOT_TOKEN
|
|
34
|
-
} from "./chunk-L4SUWH5B.js";
|
|
30
|
+
} from "./chunk-N3WANKSA.js";
|
|
35
31
|
import {
|
|
36
32
|
asProvider
|
|
37
33
|
} from "./chunk-SABTXESR.js";
|
|
34
|
+
import {
|
|
35
|
+
DISCOVERY_SNAPSHOT_TOKEN
|
|
36
|
+
} from "./chunk-L4SUWH5B.js";
|
|
38
37
|
import {
|
|
39
38
|
__name
|
|
40
39
|
} from "./chunk-SHUYVCID.js";
|
|
@@ -162,58 +161,6 @@ function validateBundleDraft(draft, snapshot, knownPlanKeys = null, marketedOnly
|
|
|
162
161
|
return warnings;
|
|
163
162
|
}
|
|
164
163
|
__name(validateBundleDraft, "validateBundleDraft");
|
|
165
|
-
function validateBusinessTypeDraft(draft, bundles, snapshot, approved = null) {
|
|
166
|
-
const warnings = [];
|
|
167
|
-
const featureToBundleKeys = /* @__PURE__ */ new Map();
|
|
168
|
-
for (const bundle of bundles) {
|
|
169
|
-
for (const feature of bundle.features) {
|
|
170
|
-
const list = featureToBundleKeys.get(feature) ?? [];
|
|
171
|
-
list.push(bundle.bundleKey);
|
|
172
|
-
featureToBundleKeys.set(feature, list);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
for (const [feature, bundleKeys] of featureToBundleKeys) {
|
|
176
|
-
if (bundleKeys.length > 1) {
|
|
177
|
-
warnings.push({
|
|
178
|
-
code: "BUNDLE_DISJOINTNESS",
|
|
179
|
-
message: `Feature '${feature}' wird von mehreren Bundles aktiviert (${bundleKeys.join(", ")}). GESCHAEFTSTYP_SPEC \xA76.3 verlangt Disjointness pro Gesch\xE4ftstyp \u2014 entferne das Feature aus allen Bundles bis auf eines.`,
|
|
180
|
-
field: "bundles",
|
|
181
|
-
value: feature
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
for (const bundle of bundles) {
|
|
186
|
-
const whitelist = bundle.compatibility?.businessTypeKeys;
|
|
187
|
-
if (whitelist && whitelist.length > 0 && !whitelist.includes(draft.businessTypeKey)) {
|
|
188
|
-
warnings.push({
|
|
189
|
-
code: "BUNDLE_COMPATIBILITY",
|
|
190
|
-
message: `Bundle '${bundle.bundleKey}' hat eine Compatibility-Whitelist [${whitelist.join(", ")}], in der '${draft.businessTypeKey}' nicht enthalten ist. Override per Audit-Marker m\xF6glich, aber riskant.`,
|
|
191
|
-
field: `bundles[${bundle.bundleKey}].compatibility`,
|
|
192
|
-
value: bundle.bundleKey
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
const knownQuotas = new Set(snapshot.quotas.map((q) => q.quotaKey));
|
|
197
|
-
for (const quotaKey of Object.keys(draft.quotaOverrides ?? {})) {
|
|
198
|
-
if (!knownQuotas.has(quotaKey)) {
|
|
199
|
-
warnings.push({
|
|
200
|
-
code: "QUOTA_MISSING",
|
|
201
|
-
message: `Quota-Override '${quotaKey}' existiert nicht im Discovery-Snapshot.`,
|
|
202
|
-
field: `quotaOverrides.${quotaKey}`,
|
|
203
|
-
value: quotaKey
|
|
204
|
-
});
|
|
205
|
-
} else if (approved && !approved.quotas.has(quotaKey)) {
|
|
206
|
-
warnings.push({
|
|
207
|
-
code: "QUOTA_NOT_APPROVED",
|
|
208
|
-
message: `Quota-Override '${quotaKey}' ist nicht freigegeben (Status != approved). Nur freigegebene Quotas sind verkaufbar \u2014 im Discovery-Review freigeben (#20).`,
|
|
209
|
-
field: `quotaOverrides.${quotaKey}`,
|
|
210
|
-
value: quotaKey
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
return warnings;
|
|
215
|
-
}
|
|
216
|
-
__name(validateBusinessTypeDraft, "validateBusinessTypeDraft");
|
|
217
164
|
function validatePlanDraft(draft, snapshot, marketedOnlyFeatures = /* @__PURE__ */ new Set(), approved = null) {
|
|
218
165
|
const warnings = [];
|
|
219
166
|
const knownFeatures = new Set(snapshot.features.map((f) => f.featureKey));
|
|
@@ -725,9 +672,8 @@ BundlesService = _ts_decorate([
|
|
|
725
672
|
])
|
|
726
673
|
], BundlesService);
|
|
727
674
|
|
|
728
|
-
// src/catalog/
|
|
729
|
-
import { Inject as Inject2, Injectable as Injectable2, NotFoundException as NotFoundException2
|
|
730
|
-
import { classifyBusinessTypeVersionDiff } from "@saasicat/types";
|
|
675
|
+
// src/catalog/marketing-projections.service.ts
|
|
676
|
+
import { ConflictException, Inject as Inject2, Injectable as Injectable2, NotFoundException as NotFoundException2 } from "@nestjs/common";
|
|
731
677
|
function _ts_decorate2(decorators, target, key, desc) {
|
|
732
678
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
733
679
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -745,276 +691,6 @@ function _ts_param2(paramIndex, decorator) {
|
|
|
745
691
|
};
|
|
746
692
|
}
|
|
747
693
|
__name(_ts_param2, "_ts_param");
|
|
748
|
-
var BusinessTypesService = class {
|
|
749
|
-
static {
|
|
750
|
-
__name(this, "BusinessTypesService");
|
|
751
|
-
}
|
|
752
|
-
repo;
|
|
753
|
-
bundleRepo;
|
|
754
|
-
snapshot;
|
|
755
|
-
scanner;
|
|
756
|
-
catalogEntries;
|
|
757
|
-
mode;
|
|
758
|
-
constructor(repo, bundleRepo, snapshot = null, config = {}, scanner = null, catalogEntries = null) {
|
|
759
|
-
this.repo = repo;
|
|
760
|
-
this.bundleRepo = bundleRepo;
|
|
761
|
-
this.snapshot = snapshot;
|
|
762
|
-
this.scanner = scanner;
|
|
763
|
-
this.catalogEntries = catalogEntries;
|
|
764
|
-
this.mode = config.strictModeCheckMode ?? "blocking";
|
|
765
|
-
}
|
|
766
|
-
// =========================================================================
|
|
767
|
-
// Master operations
|
|
768
|
-
// =========================================================================
|
|
769
|
-
listBusinessTypes(projectKey) {
|
|
770
|
-
return this.repo.list({
|
|
771
|
-
projectKey,
|
|
772
|
-
excludeDeleted: true
|
|
773
|
-
});
|
|
774
|
-
}
|
|
775
|
-
async getBusinessType(businessTypeId) {
|
|
776
|
-
const businessType = await this.repo.findById(businessTypeId);
|
|
777
|
-
if (!businessType) {
|
|
778
|
-
throw new NotFoundException2(`BusinessType '${businessTypeId}' nicht gefunden`);
|
|
779
|
-
}
|
|
780
|
-
const versions = await this.repo.listVersions(businessTypeId);
|
|
781
|
-
return {
|
|
782
|
-
businessType,
|
|
783
|
-
versions
|
|
784
|
-
};
|
|
785
|
-
}
|
|
786
|
-
async createBusinessType(data) {
|
|
787
|
-
const existing = await this.repo.findByKey(data.projectKey, data.businessTypeKey);
|
|
788
|
-
if (existing) {
|
|
789
|
-
throw new UnprocessableEntityException2(`BusinessType '${data.businessTypeKey}' existiert bereits in Projekt '${data.projectKey}'`);
|
|
790
|
-
}
|
|
791
|
-
return this.repo.create(data);
|
|
792
|
-
}
|
|
793
|
-
async updateBusinessType(businessTypeId, data) {
|
|
794
|
-
const existing = await this.repo.findById(businessTypeId);
|
|
795
|
-
if (!existing) {
|
|
796
|
-
throw new NotFoundException2(`BusinessType '${businessTypeId}' nicht gefunden`);
|
|
797
|
-
}
|
|
798
|
-
return this.repo.update(businessTypeId, data);
|
|
799
|
-
}
|
|
800
|
-
async softDeleteBusinessType(businessTypeId) {
|
|
801
|
-
const existing = await this.repo.findById(businessTypeId);
|
|
802
|
-
if (!existing) {
|
|
803
|
-
throw new NotFoundException2(`BusinessType '${businessTypeId}' nicht gefunden`);
|
|
804
|
-
}
|
|
805
|
-
if (existing.deletedAt !== null) return;
|
|
806
|
-
await this.repo.softDelete(businessTypeId);
|
|
807
|
-
}
|
|
808
|
-
// =========================================================================
|
|
809
|
-
// Version operations
|
|
810
|
-
// =========================================================================
|
|
811
|
-
listBusinessTypeVersions(businessTypeId) {
|
|
812
|
-
return this.repo.listVersions(businessTypeId);
|
|
813
|
-
}
|
|
814
|
-
async getBusinessTypeVersion(versionId) {
|
|
815
|
-
const version = await this.repo.findVersionById(versionId);
|
|
816
|
-
if (!version) {
|
|
817
|
-
throw new NotFoundException2(`BusinessTypeVersion '${versionId}' nicht gefunden`);
|
|
818
|
-
}
|
|
819
|
-
return version;
|
|
820
|
-
}
|
|
821
|
-
async createBusinessTypeDraft(data) {
|
|
822
|
-
const businessType = await this.repo.findById(data.businessTypeId);
|
|
823
|
-
if (!businessType) {
|
|
824
|
-
throw new NotFoundException2(`BusinessType '${data.businessTypeId}' nicht gefunden`);
|
|
825
|
-
}
|
|
826
|
-
const existingDraft = await this.repo.findCurrentDraft(data.businessTypeId);
|
|
827
|
-
if (existingDraft) {
|
|
828
|
-
throw new UnprocessableEntityException2(`BusinessType '${businessType.businessTypeKey}' hat bereits eine Draft-Version v${existingDraft.version}; bitte erst publishen oder verwerfen`);
|
|
829
|
-
}
|
|
830
|
-
if (!data.bundles || data.bundles.length === 0) {
|
|
831
|
-
throw new UnprocessableEntityException2("BusinessTypeVersion muss mindestens einen Bundle referenzieren (siehe GESCHAEFTSTYP_SPEC \xA710).");
|
|
832
|
-
}
|
|
833
|
-
const bundleVersions = await this.loadAndAssertBundles(data.bundles.map((b) => b.bundleVersionId));
|
|
834
|
-
if (data.baseVersionId === void 0) {
|
|
835
|
-
const latestLive = await this.repo.findLatestLive(data.businessTypeId);
|
|
836
|
-
data = {
|
|
837
|
-
...data,
|
|
838
|
-
baseVersionId: latestLive?.id ?? null
|
|
839
|
-
};
|
|
840
|
-
}
|
|
841
|
-
const warnings = await this.runStrictCheck({
|
|
842
|
-
businessTypeKey: businessType.businessTypeKey,
|
|
843
|
-
quotaOverrides: data.quotaOverrides ?? {}
|
|
844
|
-
}, bundleVersions);
|
|
845
|
-
this.gateOrPass(warnings);
|
|
846
|
-
const businessTypeVersion = await this.repo.createDraft(data);
|
|
847
|
-
return {
|
|
848
|
-
businessTypeVersion,
|
|
849
|
-
warnings
|
|
850
|
-
};
|
|
851
|
-
}
|
|
852
|
-
async updateBusinessTypeDraft(versionId, data) {
|
|
853
|
-
const existing = await this.repo.findVersionById(versionId);
|
|
854
|
-
if (!existing) {
|
|
855
|
-
throw new NotFoundException2(`BusinessTypeVersion '${versionId}' nicht gefunden`);
|
|
856
|
-
}
|
|
857
|
-
if (existing.publishedAt !== null) {
|
|
858
|
-
throw new UnprocessableEntityException2(`BusinessTypeVersion '${versionId}' ist bereits published und kann nicht mehr ge\xE4ndert werden`);
|
|
859
|
-
}
|
|
860
|
-
const businessType = await this.repo.findById(existing.businessTypeId);
|
|
861
|
-
if (!businessType) {
|
|
862
|
-
throw new NotFoundException2(`BusinessType '${existing.businessTypeId}' nicht gefunden (referentielle Inkonsistenz)`);
|
|
863
|
-
}
|
|
864
|
-
const targetBundles = data.bundles ?? existing.bundles.map((b) => ({
|
|
865
|
-
bundleVersionId: b.bundleVersionId,
|
|
866
|
-
sortOrder: b.sortOrder
|
|
867
|
-
}));
|
|
868
|
-
if (targetBundles.length === 0) {
|
|
869
|
-
throw new UnprocessableEntityException2("BusinessTypeVersion muss mindestens einen Bundle referenzieren.");
|
|
870
|
-
}
|
|
871
|
-
const bundleVersions = await this.loadAndAssertBundles(targetBundles.map((b) => b.bundleVersionId));
|
|
872
|
-
const warnings = await this.runStrictCheck({
|
|
873
|
-
businessTypeKey: businessType.businessTypeKey,
|
|
874
|
-
quotaOverrides: data.quotaOverrides ?? existing.quotaOverrides
|
|
875
|
-
}, bundleVersions);
|
|
876
|
-
this.gateOrPass(warnings);
|
|
877
|
-
const businessTypeVersion = await this.repo.updateDraft(versionId, data);
|
|
878
|
-
return {
|
|
879
|
-
businessTypeVersion,
|
|
880
|
-
warnings
|
|
881
|
-
};
|
|
882
|
-
}
|
|
883
|
-
async publishBusinessTypeVersion(versionId, publishMeta) {
|
|
884
|
-
const draft = await this.repo.findVersionById(versionId);
|
|
885
|
-
if (!draft) {
|
|
886
|
-
throw new NotFoundException2(`BusinessTypeVersion '${versionId}' nicht gefunden`);
|
|
887
|
-
}
|
|
888
|
-
if (draft.publishedAt !== null) {
|
|
889
|
-
throw new UnprocessableEntityException2(`BusinessTypeVersion '${versionId}' ist bereits published`);
|
|
890
|
-
}
|
|
891
|
-
const businessType = await this.repo.findById(draft.businessTypeId);
|
|
892
|
-
if (!businessType) {
|
|
893
|
-
throw new NotFoundException2(`BusinessType '${draft.businessTypeId}' nicht gefunden`);
|
|
894
|
-
}
|
|
895
|
-
const bundleVersions = await this.loadAndAssertBundles(draft.bundles.map((b) => b.bundleVersionId));
|
|
896
|
-
const warnings = await this.runStrictCheck({
|
|
897
|
-
businessTypeKey: businessType.businessTypeKey,
|
|
898
|
-
quotaOverrides: draft.quotaOverrides
|
|
899
|
-
}, bundleVersions);
|
|
900
|
-
this.gateOrPass(warnings);
|
|
901
|
-
const previous = await this.repo.findLatestLive(draft.businessTypeId);
|
|
902
|
-
const diff = previous ? classifyBusinessTypeVersionDiff(previous, draft) : {
|
|
903
|
-
changes: [],
|
|
904
|
-
nonRegressive: true
|
|
905
|
-
};
|
|
906
|
-
if (!diff.nonRegressive && !publishMeta.forceRegressive) {
|
|
907
|
-
throw new UnprocessableEntityException2({
|
|
908
|
-
code: "BUSINESS_TYPE_VERSION_REGRESSION",
|
|
909
|
-
message: "Diese BusinessTypeVersion ist regressiv (Bundle entfernt / Quota-Override gesenkt / Preis erh\xF6ht). Publishen erfordert explizites `forceRegressive: true` (UI-Best\xE4tigungsmodal mit MFA).",
|
|
910
|
-
changes: diff.changes
|
|
911
|
-
});
|
|
912
|
-
}
|
|
913
|
-
const businessTypeVersion = await this.repo.publishDraft(versionId, {
|
|
914
|
-
publishedByUserId: publishMeta.publishedByUserId,
|
|
915
|
-
publishedChanges: diff.changes,
|
|
916
|
-
nonRegressive: diff.nonRegressive
|
|
917
|
-
});
|
|
918
|
-
return {
|
|
919
|
-
businessTypeVersion,
|
|
920
|
-
warnings
|
|
921
|
-
};
|
|
922
|
-
}
|
|
923
|
-
// =========================================================================
|
|
924
|
-
// Helper
|
|
925
|
-
// =========================================================================
|
|
926
|
-
/**
|
|
927
|
-
* Loads the referenced BundleVersions and verifies that all exist
|
|
928
|
-
* and are published (live or superseded — both allowed, because
|
|
929
|
-
* BusinessTypeBundle holds the concrete version). Throws NotFound for
|
|
930
|
-
* missing ones, UnprocessableEntity for non-published ones.
|
|
931
|
-
*/
|
|
932
|
-
async loadAndAssertBundles(bundleVersionIds) {
|
|
933
|
-
const result = [];
|
|
934
|
-
for (const id of bundleVersionIds) {
|
|
935
|
-
const bv = await this.bundleRepo.findVersionById(id);
|
|
936
|
-
if (!bv) {
|
|
937
|
-
throw new UnprocessableEntityException2(`BundleVersion '${id}' nicht gefunden \u2014 BusinessTypeVersion kann nur published BundleVersions referenzieren`);
|
|
938
|
-
}
|
|
939
|
-
if (bv.publishedAt === null) {
|
|
940
|
-
throw new UnprocessableEntityException2(`BundleVersion '${id}' ist Draft \u2014 BusinessTypeVersion-Komposition braucht published Versionen`);
|
|
941
|
-
}
|
|
942
|
-
result.push(bv);
|
|
943
|
-
}
|
|
944
|
-
return result;
|
|
945
|
-
}
|
|
946
|
-
async runStrictCheck(draft, bundleVersions) {
|
|
947
|
-
const snapshot = resolveDiscoverySnapshot(this.snapshot, this.scanner);
|
|
948
|
-
if (!snapshot) {
|
|
949
|
-
return validateBusinessTypeDraft(draft, bundleVersions, {
|
|
950
|
-
schemaVersion: 1,
|
|
951
|
-
scannedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
952
|
-
app: {
|
|
953
|
-
key: "unknown",
|
|
954
|
-
version: "0.0.0"
|
|
955
|
-
},
|
|
956
|
-
capabilities: [],
|
|
957
|
-
features: [],
|
|
958
|
-
quotas: [],
|
|
959
|
-
hash: "sha256-empty"
|
|
960
|
-
}).filter((w) => w.code !== "QUOTA_MISSING");
|
|
961
|
-
}
|
|
962
|
-
const approved = await loadApprovedCatalogKeys(this.catalogEntries, snapshot.app.key);
|
|
963
|
-
return validateBusinessTypeDraft(draft, bundleVersions, snapshot, approved);
|
|
964
|
-
}
|
|
965
|
-
gateOrPass(warnings) {
|
|
966
|
-
if (warnings.length === 0) return;
|
|
967
|
-
if (this.mode === "blocking") {
|
|
968
|
-
throw new UnprocessableEntityException2({
|
|
969
|
-
code: "STRICT_MODE_VIOLATIONS",
|
|
970
|
-
message: "Strict-Mode-Check hat Drift gegen den Discovery-Snapshot gefunden.",
|
|
971
|
-
warnings
|
|
972
|
-
});
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
};
|
|
976
|
-
BusinessTypesService = _ts_decorate2([
|
|
977
|
-
Injectable2(),
|
|
978
|
-
_ts_param2(0, Inject2(BUSINESS_TYPE_REPOSITORY_TOKEN)),
|
|
979
|
-
_ts_param2(1, Inject2(BUNDLE_REPOSITORY_TOKEN)),
|
|
980
|
-
_ts_param2(2, Optional2()),
|
|
981
|
-
_ts_param2(2, Inject2(DISCOVERY_SNAPSHOT_TOKEN)),
|
|
982
|
-
_ts_param2(3, Optional2()),
|
|
983
|
-
_ts_param2(3, Inject2(CATALOG_SERVICE_CONFIG_TOKEN)),
|
|
984
|
-
_ts_param2(4, Optional2()),
|
|
985
|
-
_ts_param2(4, Inject2(DiscoveryScanner)),
|
|
986
|
-
_ts_param2(5, Optional2()),
|
|
987
|
-
_ts_param2(5, Inject2(CATALOG_ENTRY_REPOSITORY_TOKEN)),
|
|
988
|
-
_ts_metadata2("design:type", Function),
|
|
989
|
-
_ts_metadata2("design:paramtypes", [
|
|
990
|
-
typeof BusinessTypeRepository === "undefined" ? Object : BusinessTypeRepository,
|
|
991
|
-
typeof BundleRepository === "undefined" ? Object : BundleRepository,
|
|
992
|
-
Object,
|
|
993
|
-
typeof CatalogServiceConfig === "undefined" ? Object : CatalogServiceConfig,
|
|
994
|
-
Object,
|
|
995
|
-
Object
|
|
996
|
-
])
|
|
997
|
-
], BusinessTypesService);
|
|
998
|
-
|
|
999
|
-
// src/catalog/marketing-projections.service.ts
|
|
1000
|
-
import { ConflictException, Inject as Inject3, Injectable as Injectable3, NotFoundException as NotFoundException3 } from "@nestjs/common";
|
|
1001
|
-
function _ts_decorate3(decorators, target, key, desc) {
|
|
1002
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1003
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1004
|
-
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;
|
|
1005
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1006
|
-
}
|
|
1007
|
-
__name(_ts_decorate3, "_ts_decorate");
|
|
1008
|
-
function _ts_metadata3(k, v) {
|
|
1009
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1010
|
-
}
|
|
1011
|
-
__name(_ts_metadata3, "_ts_metadata");
|
|
1012
|
-
function _ts_param3(paramIndex, decorator) {
|
|
1013
|
-
return function(target, key) {
|
|
1014
|
-
decorator(target, key, paramIndex);
|
|
1015
|
-
};
|
|
1016
|
-
}
|
|
1017
|
-
__name(_ts_param3, "_ts_param");
|
|
1018
694
|
var MarketingProjectionsService = class {
|
|
1019
695
|
static {
|
|
1020
696
|
__name(this, "MarketingProjectionsService");
|
|
@@ -1029,7 +705,7 @@ var MarketingProjectionsService = class {
|
|
|
1029
705
|
async getById(id) {
|
|
1030
706
|
const row = await this.repo.findById(id);
|
|
1031
707
|
if (!row) {
|
|
1032
|
-
throw new
|
|
708
|
+
throw new NotFoundException2(`MarketingProjection '${id}' nicht gefunden`);
|
|
1033
709
|
}
|
|
1034
710
|
return row;
|
|
1035
711
|
}
|
|
@@ -1047,29 +723,29 @@ var MarketingProjectionsService = class {
|
|
|
1047
723
|
async update(id, data) {
|
|
1048
724
|
const existing = await this.repo.findById(id);
|
|
1049
725
|
if (!existing) {
|
|
1050
|
-
throw new
|
|
726
|
+
throw new NotFoundException2(`MarketingProjection '${id}' nicht gefunden`);
|
|
1051
727
|
}
|
|
1052
728
|
return this.repo.update(id, data);
|
|
1053
729
|
}
|
|
1054
730
|
async delete(id) {
|
|
1055
731
|
const existing = await this.repo.findById(id);
|
|
1056
732
|
if (!existing) {
|
|
1057
|
-
throw new
|
|
733
|
+
throw new NotFoundException2(`MarketingProjection '${id}' nicht gefunden`);
|
|
1058
734
|
}
|
|
1059
735
|
await this.repo.delete(id);
|
|
1060
736
|
}
|
|
1061
737
|
};
|
|
1062
|
-
MarketingProjectionsService =
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
738
|
+
MarketingProjectionsService = _ts_decorate2([
|
|
739
|
+
Injectable2(),
|
|
740
|
+
_ts_param2(0, Inject2(MARKETING_PROJECTION_REPOSITORY_TOKEN)),
|
|
741
|
+
_ts_metadata2("design:type", Function),
|
|
742
|
+
_ts_metadata2("design:paramtypes", [
|
|
1067
743
|
typeof MarketingProjectionRepository === "undefined" ? Object : MarketingProjectionRepository
|
|
1068
744
|
])
|
|
1069
745
|
], MarketingProjectionsService);
|
|
1070
746
|
|
|
1071
747
|
// src/catalog/catalog-entries.service.ts
|
|
1072
|
-
import { Inject as
|
|
748
|
+
import { Inject as Inject3, Injectable as Injectable3, Logger as Logger2, NotFoundException as NotFoundException3, Optional as Optional2, UnprocessableEntityException as UnprocessableEntityException2 } from "@nestjs/common";
|
|
1073
749
|
|
|
1074
750
|
// src/catalog/approval-signature.ts
|
|
1075
751
|
function featureApprovalSignature(featureKey, snapshot) {
|
|
@@ -1094,23 +770,23 @@ function keyListSegment(name, keys) {
|
|
|
1094
770
|
__name(keyListSegment, "keyListSegment");
|
|
1095
771
|
|
|
1096
772
|
// src/catalog/catalog-entries.service.ts
|
|
1097
|
-
function
|
|
773
|
+
function _ts_decorate3(decorators, target, key, desc) {
|
|
1098
774
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1099
775
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1100
776
|
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;
|
|
1101
777
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1102
778
|
}
|
|
1103
|
-
__name(
|
|
1104
|
-
function
|
|
779
|
+
__name(_ts_decorate3, "_ts_decorate");
|
|
780
|
+
function _ts_metadata3(k, v) {
|
|
1105
781
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1106
782
|
}
|
|
1107
|
-
__name(
|
|
1108
|
-
function
|
|
783
|
+
__name(_ts_metadata3, "_ts_metadata");
|
|
784
|
+
function _ts_param3(paramIndex, decorator) {
|
|
1109
785
|
return function(target, key) {
|
|
1110
786
|
decorator(target, key, paramIndex);
|
|
1111
787
|
};
|
|
1112
788
|
}
|
|
1113
|
-
__name(
|
|
789
|
+
__name(_ts_param3, "_ts_param");
|
|
1114
790
|
var REVIEW_TRANSITIONS = {
|
|
1115
791
|
pending: [
|
|
1116
792
|
"approved",
|
|
@@ -1219,7 +895,7 @@ var CatalogEntriesService = class _CatalogEntriesService {
|
|
|
1219
895
|
async reviewFeature(projectKey, featureKey, data, reviewedBy) {
|
|
1220
896
|
const existing = await this.repo.findFeature(projectKey, featureKey);
|
|
1221
897
|
if (!existing) {
|
|
1222
|
-
throw new
|
|
898
|
+
throw new NotFoundException3(`Feature '${featureKey}' in Projekt '${projectKey}' nicht gefunden`);
|
|
1223
899
|
}
|
|
1224
900
|
return this.repo.setFeatureReview(projectKey, featureKey, this.resolveReviewUpdate(existing, data.discoveryStatus, reviewedBy, (snapshot) => featureApprovalSignature(featureKey, snapshot)));
|
|
1225
901
|
}
|
|
@@ -1227,24 +903,24 @@ var CatalogEntriesService = class _CatalogEntriesService {
|
|
|
1227
903
|
async reviewQuota(projectKey, quotaKey, data, reviewedBy) {
|
|
1228
904
|
const existing = await this.repo.findQuota(projectKey, quotaKey);
|
|
1229
905
|
if (!existing) {
|
|
1230
|
-
throw new
|
|
906
|
+
throw new NotFoundException3(`Quota '${quotaKey}' in Projekt '${projectKey}' nicht gefunden`);
|
|
1231
907
|
}
|
|
1232
908
|
return this.repo.setQuotaReview(projectKey, quotaKey, this.resolveReviewUpdate(existing, data.discoveryStatus, reviewedBy, (snapshot) => {
|
|
1233
909
|
const discovered = snapshot.quotas.find((q) => q.quotaKey === quotaKey);
|
|
1234
910
|
if (!discovered) {
|
|
1235
|
-
throw new
|
|
911
|
+
throw new UnprocessableEntityException2(`Quota '${quotaKey}' ist nicht im Discovery-Snapshot \u2014 eine nicht im Code deklarierte Quota kann nicht freigegeben werden`);
|
|
1236
912
|
}
|
|
1237
913
|
return quotaApprovalSignature(discovered);
|
|
1238
914
|
}));
|
|
1239
915
|
}
|
|
1240
916
|
resolveReviewUpdate(existing, target, reviewedBy, signatureOf) {
|
|
1241
917
|
if (!REVIEW_TRANSITIONS[existing.discoveryStatus].includes(target)) {
|
|
1242
|
-
throw new
|
|
918
|
+
throw new UnprocessableEntityException2(`\xDCbergang '${existing.discoveryStatus}' \u2192 '${target}' ist nicht erlaubt`);
|
|
1243
919
|
}
|
|
1244
920
|
if (target === "approved") {
|
|
1245
921
|
const snapshot = resolveDiscoverySnapshot(this.snapshot, this.scanner);
|
|
1246
922
|
if (!snapshot) {
|
|
1247
|
-
throw new
|
|
923
|
+
throw new UnprocessableEntityException2("Freigabe braucht einen Discovery-Snapshot \u2014 Discovery ist nicht initialisiert (#25)");
|
|
1248
924
|
}
|
|
1249
925
|
return {
|
|
1250
926
|
discoveryStatus: "approved",
|
|
@@ -1461,19 +1137,19 @@ var CatalogEntriesService = class _CatalogEntriesService {
|
|
|
1461
1137
|
return replaced;
|
|
1462
1138
|
}
|
|
1463
1139
|
};
|
|
1464
|
-
CatalogEntriesService =
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1140
|
+
CatalogEntriesService = _ts_decorate3([
|
|
1141
|
+
Injectable3(),
|
|
1142
|
+
_ts_param3(0, Inject3(CATALOG_ENTRY_REPOSITORY_TOKEN)),
|
|
1143
|
+
_ts_param3(1, Optional2()),
|
|
1144
|
+
_ts_param3(1, Inject3(DISCOVERY_SNAPSHOT_TOKEN)),
|
|
1145
|
+
_ts_param3(2, Optional2()),
|
|
1146
|
+
_ts_param3(2, Inject3(CATALOG_SERVICE_CONFIG_TOKEN)),
|
|
1147
|
+
_ts_param3(3, Optional2()),
|
|
1148
|
+
_ts_param3(3, Inject3(DiscoveryScanner)),
|
|
1149
|
+
_ts_param3(4, Optional2()),
|
|
1150
|
+
_ts_param3(4, Inject3(FEATURE_UI_REGISTRY_TOKEN)),
|
|
1151
|
+
_ts_metadata3("design:type", Function),
|
|
1152
|
+
_ts_metadata3("design:paramtypes", [
|
|
1477
1153
|
typeof CatalogEntryRepository === "undefined" ? Object : CatalogEntryRepository,
|
|
1478
1154
|
Object,
|
|
1479
1155
|
typeof CatalogServiceConfig === "undefined" ? Object : CatalogServiceConfig,
|
|
@@ -1483,27 +1159,27 @@ CatalogEntriesService = _ts_decorate4([
|
|
|
1483
1159
|
], CatalogEntriesService);
|
|
1484
1160
|
|
|
1485
1161
|
// src/catalog/catalog-entries.controller.ts
|
|
1486
|
-
import { Body, Controller, Get, Inject as
|
|
1162
|
+
import { Body, Controller, Get, Inject as Inject5, Optional as Optional4, Param, Patch, Post, Query, Req, UseGuards } from "@nestjs/common";
|
|
1487
1163
|
|
|
1488
1164
|
// src/core/web-audit.ts
|
|
1489
|
-
import { Inject as
|
|
1490
|
-
function
|
|
1165
|
+
import { Inject as Inject4, Injectable as Injectable4, Optional as Optional3 } from "@nestjs/common";
|
|
1166
|
+
function _ts_decorate4(decorators, target, key, desc) {
|
|
1491
1167
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1492
1168
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1493
1169
|
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;
|
|
1494
1170
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1495
1171
|
}
|
|
1496
|
-
__name(
|
|
1497
|
-
function
|
|
1172
|
+
__name(_ts_decorate4, "_ts_decorate");
|
|
1173
|
+
function _ts_metadata4(k, v) {
|
|
1498
1174
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1499
1175
|
}
|
|
1500
|
-
__name(
|
|
1501
|
-
function
|
|
1176
|
+
__name(_ts_metadata4, "_ts_metadata");
|
|
1177
|
+
function _ts_param4(paramIndex, decorator) {
|
|
1502
1178
|
return function(target, key) {
|
|
1503
1179
|
decorator(target, key, paramIndex);
|
|
1504
1180
|
};
|
|
1505
1181
|
}
|
|
1506
|
-
__name(
|
|
1182
|
+
__name(_ts_param4, "_ts_param");
|
|
1507
1183
|
var DEFAULT_CONTEXT = "admin";
|
|
1508
1184
|
var WebAuditLogger = class {
|
|
1509
1185
|
static {
|
|
@@ -1560,18 +1236,18 @@ var WebAuditLogger = class {
|
|
|
1560
1236
|
}
|
|
1561
1237
|
}
|
|
1562
1238
|
};
|
|
1563
|
-
WebAuditLogger =
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1239
|
+
WebAuditLogger = _ts_decorate4([
|
|
1240
|
+
Injectable4(),
|
|
1241
|
+
_ts_param4(0, Optional3()),
|
|
1242
|
+
_ts_param4(0, Inject4(AdminAuditService)),
|
|
1243
|
+
_ts_param4(1, Optional3()),
|
|
1244
|
+
_ts_param4(1, Inject4(USER_ID_RESOLVER_TOKEN)),
|
|
1245
|
+
_ts_param4(2, Optional3()),
|
|
1246
|
+
_ts_param4(2, Inject4(USER_EMAIL_RESOLVER_TOKEN)),
|
|
1247
|
+
_ts_param4(3, Optional3()),
|
|
1248
|
+
_ts_param4(3, Inject4(AUDIT_CONTEXT_RESOLVER_TOKEN)),
|
|
1249
|
+
_ts_metadata4("design:type", Function),
|
|
1250
|
+
_ts_metadata4("design:paramtypes", [
|
|
1575
1251
|
Object,
|
|
1576
1252
|
Object,
|
|
1577
1253
|
Object,
|
|
@@ -1581,17 +1257,17 @@ WebAuditLogger = _ts_decorate5([
|
|
|
1581
1257
|
|
|
1582
1258
|
// src/catalog/dto/catalog-entries.dto.ts
|
|
1583
1259
|
import { IsIn, IsObject, IsOptional, IsString, Matches, MaxLength } from "class-validator";
|
|
1584
|
-
function
|
|
1260
|
+
function _ts_decorate5(decorators, target, key, desc) {
|
|
1585
1261
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1586
1262
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1587
1263
|
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;
|
|
1588
1264
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1589
1265
|
}
|
|
1590
|
-
__name(
|
|
1591
|
-
function
|
|
1266
|
+
__name(_ts_decorate5, "_ts_decorate");
|
|
1267
|
+
function _ts_metadata5(k, v) {
|
|
1592
1268
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1593
1269
|
}
|
|
1594
|
-
__name(
|
|
1270
|
+
__name(_ts_metadata5, "_ts_metadata");
|
|
1595
1271
|
var PROJECT_KEY_PATTERN = /^[a-z][a-z0-9-]*$/;
|
|
1596
1272
|
var REVIEW_STATUSES = [
|
|
1597
1273
|
"pending",
|
|
@@ -1615,24 +1291,24 @@ var ListCatalogEntriesQueryDto = class {
|
|
|
1615
1291
|
/** Filter for capabilities (read-only code facts). */
|
|
1616
1292
|
codeStatus;
|
|
1617
1293
|
};
|
|
1618
|
-
|
|
1294
|
+
_ts_decorate5([
|
|
1619
1295
|
IsString(),
|
|
1620
1296
|
Matches(PROJECT_KEY_PATTERN, {
|
|
1621
1297
|
message: "projectKey muss kebab-case sein"
|
|
1622
1298
|
}),
|
|
1623
|
-
|
|
1299
|
+
_ts_metadata5("design:type", String)
|
|
1624
1300
|
], ListCatalogEntriesQueryDto.prototype, "projectKey", void 0);
|
|
1625
|
-
|
|
1301
|
+
_ts_decorate5([
|
|
1626
1302
|
IsOptional(),
|
|
1627
1303
|
IsString(),
|
|
1628
1304
|
IsIn(REVIEW_STATUSES),
|
|
1629
|
-
|
|
1305
|
+
_ts_metadata5("design:type", String)
|
|
1630
1306
|
], ListCatalogEntriesQueryDto.prototype, "discoveryStatus", void 0);
|
|
1631
|
-
|
|
1307
|
+
_ts_decorate5([
|
|
1632
1308
|
IsOptional(),
|
|
1633
1309
|
IsString(),
|
|
1634
1310
|
IsIn(CODE_STATUSES),
|
|
1635
|
-
|
|
1311
|
+
_ts_metadata5("design:type", String)
|
|
1636
1312
|
], ListCatalogEntriesQueryDto.prototype, "codeStatus", void 0);
|
|
1637
1313
|
var ReviewCatalogEntryDto = class {
|
|
1638
1314
|
static {
|
|
@@ -1640,12 +1316,12 @@ var ReviewCatalogEntryDto = class {
|
|
|
1640
1316
|
}
|
|
1641
1317
|
discoveryStatus;
|
|
1642
1318
|
};
|
|
1643
|
-
|
|
1319
|
+
_ts_decorate5([
|
|
1644
1320
|
IsString(),
|
|
1645
1321
|
IsIn(REVIEW_STATUSES, {
|
|
1646
1322
|
message: "discoveryStatus muss pending|approved|outdated|obsolete sein"
|
|
1647
1323
|
}),
|
|
1648
|
-
|
|
1324
|
+
_ts_metadata5("design:type", typeof DiscoveryStatus === "undefined" ? Object : DiscoveryStatus)
|
|
1649
1325
|
], ReviewCatalogEntryDto.prototype, "discoveryStatus", void 0);
|
|
1650
1326
|
var UpdateCatalogEntryI18nDto = class {
|
|
1651
1327
|
static {
|
|
@@ -1653,9 +1329,9 @@ var UpdateCatalogEntryI18nDto = class {
|
|
|
1653
1329
|
}
|
|
1654
1330
|
i18n;
|
|
1655
1331
|
};
|
|
1656
|
-
|
|
1332
|
+
_ts_decorate5([
|
|
1657
1333
|
IsObject(),
|
|
1658
|
-
|
|
1334
|
+
_ts_metadata5("design:type", typeof CatalogEntryI18n === "undefined" ? Object : CatalogEntryI18n)
|
|
1659
1335
|
], UpdateCatalogEntryI18nDto.prototype, "i18n", void 0);
|
|
1660
1336
|
var UpdateCatalogEntryBaseDto = class {
|
|
1661
1337
|
static {
|
|
@@ -1668,29 +1344,29 @@ var UpdateCatalogEntryBaseDto = class {
|
|
|
1668
1344
|
icon;
|
|
1669
1345
|
tier;
|
|
1670
1346
|
};
|
|
1671
|
-
|
|
1347
|
+
_ts_decorate5([
|
|
1672
1348
|
IsOptional(),
|
|
1673
1349
|
IsString(),
|
|
1674
1350
|
MaxLength(120),
|
|
1675
|
-
|
|
1351
|
+
_ts_metadata5("design:type", String)
|
|
1676
1352
|
], UpdateCatalogEntryBaseDto.prototype, "label", void 0);
|
|
1677
|
-
|
|
1353
|
+
_ts_decorate5([
|
|
1678
1354
|
IsOptional(),
|
|
1679
1355
|
IsString(),
|
|
1680
1356
|
MaxLength(2e3),
|
|
1681
|
-
|
|
1357
|
+
_ts_metadata5("design:type", Object)
|
|
1682
1358
|
], UpdateCatalogEntryBaseDto.prototype, "description", void 0);
|
|
1683
|
-
|
|
1359
|
+
_ts_decorate5([
|
|
1684
1360
|
IsOptional(),
|
|
1685
1361
|
IsString(),
|
|
1686
1362
|
MaxLength(64),
|
|
1687
|
-
|
|
1363
|
+
_ts_metadata5("design:type", Object)
|
|
1688
1364
|
], UpdateCatalogEntryBaseDto.prototype, "icon", void 0);
|
|
1689
|
-
|
|
1365
|
+
_ts_decorate5([
|
|
1690
1366
|
IsOptional(),
|
|
1691
1367
|
IsString(),
|
|
1692
1368
|
MaxLength(40),
|
|
1693
|
-
|
|
1369
|
+
_ts_metadata5("design:type", Object)
|
|
1694
1370
|
], UpdateCatalogEntryBaseDto.prototype, "tier", void 0);
|
|
1695
1371
|
var SyncDiscoveryDto = class {
|
|
1696
1372
|
static {
|
|
@@ -1698,29 +1374,29 @@ var SyncDiscoveryDto = class {
|
|
|
1698
1374
|
}
|
|
1699
1375
|
snapshot;
|
|
1700
1376
|
};
|
|
1701
|
-
|
|
1377
|
+
_ts_decorate5([
|
|
1702
1378
|
IsObject(),
|
|
1703
|
-
|
|
1379
|
+
_ts_metadata5("design:type", typeof DiscoverySnapshot === "undefined" ? Object : DiscoverySnapshot)
|
|
1704
1380
|
], SyncDiscoveryDto.prototype, "snapshot", void 0);
|
|
1705
1381
|
|
|
1706
1382
|
// src/catalog/catalog-entries.controller.ts
|
|
1707
|
-
function
|
|
1383
|
+
function _ts_decorate6(decorators, target, key, desc) {
|
|
1708
1384
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1709
1385
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1710
1386
|
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;
|
|
1711
1387
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1712
1388
|
}
|
|
1713
|
-
__name(
|
|
1714
|
-
function
|
|
1389
|
+
__name(_ts_decorate6, "_ts_decorate");
|
|
1390
|
+
function _ts_metadata6(k, v) {
|
|
1715
1391
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1716
1392
|
}
|
|
1717
|
-
__name(
|
|
1718
|
-
function
|
|
1393
|
+
__name(_ts_metadata6, "_ts_metadata");
|
|
1394
|
+
function _ts_param5(paramIndex, decorator) {
|
|
1719
1395
|
return function(target, key) {
|
|
1720
1396
|
decorator(target, key, paramIndex);
|
|
1721
1397
|
};
|
|
1722
1398
|
}
|
|
1723
|
-
__name(
|
|
1399
|
+
__name(_ts_param5, "_ts_param");
|
|
1724
1400
|
function buildCatalogEntriesController(guards) {
|
|
1725
1401
|
let GeneratedCatalogEntriesController = class GeneratedCatalogEntriesController {
|
|
1726
1402
|
static {
|
|
@@ -1798,142 +1474,142 @@ function buildCatalogEntriesController(guards) {
|
|
|
1798
1474
|
return result;
|
|
1799
1475
|
}
|
|
1800
1476
|
};
|
|
1801
|
-
|
|
1477
|
+
_ts_decorate6([
|
|
1802
1478
|
Get("capabilities"),
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1479
|
+
_ts_param5(0, Query()),
|
|
1480
|
+
_ts_metadata6("design:type", Function),
|
|
1481
|
+
_ts_metadata6("design:paramtypes", [
|
|
1806
1482
|
typeof ListCatalogEntriesQueryDto === "undefined" ? Object : ListCatalogEntriesQueryDto
|
|
1807
1483
|
]),
|
|
1808
|
-
|
|
1484
|
+
_ts_metadata6("design:returntype", void 0)
|
|
1809
1485
|
], GeneratedCatalogEntriesController.prototype, "listCapabilities", null);
|
|
1810
|
-
|
|
1486
|
+
_ts_decorate6([
|
|
1811
1487
|
Get("features"),
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1488
|
+
_ts_param5(0, Query()),
|
|
1489
|
+
_ts_metadata6("design:type", Function),
|
|
1490
|
+
_ts_metadata6("design:paramtypes", [
|
|
1815
1491
|
typeof ListCatalogEntriesQueryDto === "undefined" ? Object : ListCatalogEntriesQueryDto
|
|
1816
1492
|
]),
|
|
1817
|
-
|
|
1493
|
+
_ts_metadata6("design:returntype", void 0)
|
|
1818
1494
|
], GeneratedCatalogEntriesController.prototype, "listFeatures", null);
|
|
1819
|
-
|
|
1495
|
+
_ts_decorate6([
|
|
1820
1496
|
Get("quotas"),
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1497
|
+
_ts_param5(0, Query()),
|
|
1498
|
+
_ts_metadata6("design:type", Function),
|
|
1499
|
+
_ts_metadata6("design:paramtypes", [
|
|
1824
1500
|
typeof ListCatalogEntriesQueryDto === "undefined" ? Object : ListCatalogEntriesQueryDto
|
|
1825
1501
|
]),
|
|
1826
|
-
|
|
1502
|
+
_ts_metadata6("design:returntype", void 0)
|
|
1827
1503
|
], GeneratedCatalogEntriesController.prototype, "listQuotas", null);
|
|
1828
|
-
|
|
1504
|
+
_ts_decorate6([
|
|
1829
1505
|
Patch("features/:key/review"),
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1506
|
+
_ts_param5(0, Req()),
|
|
1507
|
+
_ts_param5(1, Param("key")),
|
|
1508
|
+
_ts_param5(2, Query("projectKey")),
|
|
1509
|
+
_ts_param5(3, Body()),
|
|
1510
|
+
_ts_metadata6("design:type", Function),
|
|
1511
|
+
_ts_metadata6("design:paramtypes", [
|
|
1836
1512
|
Object,
|
|
1837
1513
|
String,
|
|
1838
1514
|
String,
|
|
1839
1515
|
typeof ReviewCatalogEntryDto === "undefined" ? Object : ReviewCatalogEntryDto
|
|
1840
1516
|
]),
|
|
1841
|
-
|
|
1517
|
+
_ts_metadata6("design:returntype", Promise)
|
|
1842
1518
|
], GeneratedCatalogEntriesController.prototype, "reviewFeature", null);
|
|
1843
|
-
|
|
1519
|
+
_ts_decorate6([
|
|
1844
1520
|
Patch("quotas/:key/review"),
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1521
|
+
_ts_param5(0, Req()),
|
|
1522
|
+
_ts_param5(1, Param("key")),
|
|
1523
|
+
_ts_param5(2, Query("projectKey")),
|
|
1524
|
+
_ts_param5(3, Body()),
|
|
1525
|
+
_ts_metadata6("design:type", Function),
|
|
1526
|
+
_ts_metadata6("design:paramtypes", [
|
|
1851
1527
|
Object,
|
|
1852
1528
|
String,
|
|
1853
1529
|
String,
|
|
1854
1530
|
typeof ReviewCatalogEntryDto === "undefined" ? Object : ReviewCatalogEntryDto
|
|
1855
1531
|
]),
|
|
1856
|
-
|
|
1532
|
+
_ts_metadata6("design:returntype", Promise)
|
|
1857
1533
|
], GeneratedCatalogEntriesController.prototype, "reviewQuota", null);
|
|
1858
|
-
|
|
1534
|
+
_ts_decorate6([
|
|
1859
1535
|
Patch("features/:key/i18n"),
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1536
|
+
_ts_param5(0, Req()),
|
|
1537
|
+
_ts_param5(1, Param("key")),
|
|
1538
|
+
_ts_param5(2, Query("projectKey")),
|
|
1539
|
+
_ts_param5(3, Body()),
|
|
1540
|
+
_ts_metadata6("design:type", Function),
|
|
1541
|
+
_ts_metadata6("design:paramtypes", [
|
|
1866
1542
|
Object,
|
|
1867
1543
|
String,
|
|
1868
1544
|
String,
|
|
1869
1545
|
typeof UpdateCatalogEntryI18nDto === "undefined" ? Object : UpdateCatalogEntryI18nDto
|
|
1870
1546
|
]),
|
|
1871
|
-
|
|
1547
|
+
_ts_metadata6("design:returntype", Promise)
|
|
1872
1548
|
], GeneratedCatalogEntriesController.prototype, "setFeatureI18n", null);
|
|
1873
|
-
|
|
1549
|
+
_ts_decorate6([
|
|
1874
1550
|
Patch("quotas/:key/i18n"),
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1551
|
+
_ts_param5(0, Req()),
|
|
1552
|
+
_ts_param5(1, Param("key")),
|
|
1553
|
+
_ts_param5(2, Query("projectKey")),
|
|
1554
|
+
_ts_param5(3, Body()),
|
|
1555
|
+
_ts_metadata6("design:type", Function),
|
|
1556
|
+
_ts_metadata6("design:paramtypes", [
|
|
1881
1557
|
Object,
|
|
1882
1558
|
String,
|
|
1883
1559
|
String,
|
|
1884
1560
|
typeof UpdateCatalogEntryI18nDto === "undefined" ? Object : UpdateCatalogEntryI18nDto
|
|
1885
1561
|
]),
|
|
1886
|
-
|
|
1562
|
+
_ts_metadata6("design:returntype", Promise)
|
|
1887
1563
|
], GeneratedCatalogEntriesController.prototype, "setQuotaI18n", null);
|
|
1888
|
-
|
|
1564
|
+
_ts_decorate6([
|
|
1889
1565
|
Patch("features/:key"),
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1566
|
+
_ts_param5(0, Req()),
|
|
1567
|
+
_ts_param5(1, Param("key")),
|
|
1568
|
+
_ts_param5(2, Query("projectKey")),
|
|
1569
|
+
_ts_param5(3, Body()),
|
|
1570
|
+
_ts_metadata6("design:type", Function),
|
|
1571
|
+
_ts_metadata6("design:paramtypes", [
|
|
1896
1572
|
Object,
|
|
1897
1573
|
String,
|
|
1898
1574
|
String,
|
|
1899
1575
|
typeof UpdateCatalogEntryBaseDto === "undefined" ? Object : UpdateCatalogEntryBaseDto
|
|
1900
1576
|
]),
|
|
1901
|
-
|
|
1577
|
+
_ts_metadata6("design:returntype", Promise)
|
|
1902
1578
|
], GeneratedCatalogEntriesController.prototype, "setFeatureBase", null);
|
|
1903
|
-
|
|
1579
|
+
_ts_decorate6([
|
|
1904
1580
|
Patch("quotas/:key"),
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1581
|
+
_ts_param5(0, Req()),
|
|
1582
|
+
_ts_param5(1, Param("key")),
|
|
1583
|
+
_ts_param5(2, Query("projectKey")),
|
|
1584
|
+
_ts_param5(3, Body()),
|
|
1585
|
+
_ts_metadata6("design:type", Function),
|
|
1586
|
+
_ts_metadata6("design:paramtypes", [
|
|
1911
1587
|
Object,
|
|
1912
1588
|
String,
|
|
1913
1589
|
String,
|
|
1914
1590
|
typeof UpdateCatalogEntryBaseDto === "undefined" ? Object : UpdateCatalogEntryBaseDto
|
|
1915
1591
|
]),
|
|
1916
|
-
|
|
1592
|
+
_ts_metadata6("design:returntype", Promise)
|
|
1917
1593
|
], GeneratedCatalogEntriesController.prototype, "setQuotaBase", null);
|
|
1918
|
-
|
|
1594
|
+
_ts_decorate6([
|
|
1919
1595
|
Post("discovery/sync"),
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1596
|
+
_ts_param5(0, Req()),
|
|
1597
|
+
_ts_param5(1, Body()),
|
|
1598
|
+
_ts_metadata6("design:type", Function),
|
|
1599
|
+
_ts_metadata6("design:paramtypes", [
|
|
1924
1600
|
Object,
|
|
1925
1601
|
typeof SyncDiscoveryDto === "undefined" ? Object : SyncDiscoveryDto
|
|
1926
1602
|
]),
|
|
1927
|
-
|
|
1603
|
+
_ts_metadata6("design:returntype", Promise)
|
|
1928
1604
|
], GeneratedCatalogEntriesController.prototype, "syncDiscovery", null);
|
|
1929
|
-
GeneratedCatalogEntriesController =
|
|
1605
|
+
GeneratedCatalogEntriesController = _ts_decorate6([
|
|
1930
1606
|
Controller("admin/catalog"),
|
|
1931
1607
|
UseGuards(...guards),
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1608
|
+
_ts_param5(0, Inject5(CatalogEntriesService)),
|
|
1609
|
+
_ts_param5(1, Optional4()),
|
|
1610
|
+
_ts_param5(1, Inject5(WebAuditLogger)),
|
|
1611
|
+
_ts_metadata6("design:type", Function),
|
|
1612
|
+
_ts_metadata6("design:paramtypes", [
|
|
1937
1613
|
typeof CatalogEntriesService === "undefined" ? Object : CatalogEntriesService,
|
|
1938
1614
|
Object
|
|
1939
1615
|
])
|
|
@@ -1943,24 +1619,24 @@ function buildCatalogEntriesController(guards) {
|
|
|
1943
1619
|
__name(buildCatalogEntriesController, "buildCatalogEntriesController");
|
|
1944
1620
|
|
|
1945
1621
|
// src/catalog/promotions.service.ts
|
|
1946
|
-
import { Inject as
|
|
1947
|
-
function
|
|
1622
|
+
import { Inject as Inject6, Injectable as Injectable5, NotFoundException as NotFoundException4 } from "@nestjs/common";
|
|
1623
|
+
function _ts_decorate7(decorators, target, key, desc) {
|
|
1948
1624
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1949
1625
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1950
1626
|
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;
|
|
1951
1627
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1952
1628
|
}
|
|
1953
|
-
__name(
|
|
1954
|
-
function
|
|
1629
|
+
__name(_ts_decorate7, "_ts_decorate");
|
|
1630
|
+
function _ts_metadata7(k, v) {
|
|
1955
1631
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1956
1632
|
}
|
|
1957
|
-
__name(
|
|
1958
|
-
function
|
|
1633
|
+
__name(_ts_metadata7, "_ts_metadata");
|
|
1634
|
+
function _ts_param6(paramIndex, decorator) {
|
|
1959
1635
|
return function(target, key) {
|
|
1960
1636
|
decorator(target, key, paramIndex);
|
|
1961
1637
|
};
|
|
1962
1638
|
}
|
|
1963
|
-
__name(
|
|
1639
|
+
__name(_ts_param6, "_ts_param");
|
|
1964
1640
|
var PromotionsService = class {
|
|
1965
1641
|
static {
|
|
1966
1642
|
__name(this, "PromotionsService");
|
|
@@ -1977,7 +1653,7 @@ var PromotionsService = class {
|
|
|
1977
1653
|
async getById(id) {
|
|
1978
1654
|
const row = await this.repo.findById(id);
|
|
1979
1655
|
if (!row) {
|
|
1980
|
-
throw new
|
|
1656
|
+
throw new NotFoundException4(`Promotion '${id}' nicht gefunden`);
|
|
1981
1657
|
}
|
|
1982
1658
|
return row;
|
|
1983
1659
|
}
|
|
@@ -1987,43 +1663,43 @@ var PromotionsService = class {
|
|
|
1987
1663
|
async update(id, data) {
|
|
1988
1664
|
const existing = await this.repo.findById(id);
|
|
1989
1665
|
if (!existing) {
|
|
1990
|
-
throw new
|
|
1666
|
+
throw new NotFoundException4(`Promotion '${id}' nicht gefunden`);
|
|
1991
1667
|
}
|
|
1992
1668
|
return this.repo.update(id, data);
|
|
1993
1669
|
}
|
|
1994
1670
|
async delete(id) {
|
|
1995
1671
|
const existing = await this.repo.findById(id);
|
|
1996
1672
|
if (!existing) {
|
|
1997
|
-
throw new
|
|
1673
|
+
throw new NotFoundException4(`Promotion '${id}' nicht gefunden`);
|
|
1998
1674
|
}
|
|
1999
1675
|
await this.repo.delete(id);
|
|
2000
1676
|
}
|
|
2001
1677
|
};
|
|
2002
|
-
PromotionsService =
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
1678
|
+
PromotionsService = _ts_decorate7([
|
|
1679
|
+
Injectable5(),
|
|
1680
|
+
_ts_param6(0, Inject6(PROMOTION_REPOSITORY_TOKEN)),
|
|
1681
|
+
_ts_metadata7("design:type", Function),
|
|
1682
|
+
_ts_metadata7("design:paramtypes", [
|
|
2007
1683
|
typeof PromotionRepository === "undefined" ? Object : PromotionRepository
|
|
2008
1684
|
])
|
|
2009
1685
|
], PromotionsService);
|
|
2010
1686
|
|
|
2011
1687
|
// src/catalog/promotions.controller.ts
|
|
2012
|
-
import { Body as Body2, Controller as Controller2, Delete, Get as Get2, HttpCode, HttpStatus, Inject as
|
|
1688
|
+
import { Body as Body2, Controller as Controller2, Delete, Get as Get2, HttpCode, HttpStatus, Inject as Inject7, Param as Param2, ParseUUIDPipe, Patch as Patch2, Post as Post2, Query as Query2, UseGuards as UseGuards2 } from "@nestjs/common";
|
|
2013
1689
|
|
|
2014
1690
|
// src/catalog/dto/promotions.dto.ts
|
|
2015
1691
|
import { IsArray, IsBoolean, IsDefined, IsIn as IsIn2, IsInt, IsObject as IsObject2, IsOptional as IsOptional2, IsString as IsString2, Matches as Matches2, MaxLength as MaxLength2 } from "class-validator";
|
|
2016
|
-
function
|
|
1692
|
+
function _ts_decorate8(decorators, target, key, desc) {
|
|
2017
1693
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2018
1694
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2019
1695
|
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;
|
|
2020
1696
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2021
1697
|
}
|
|
2022
|
-
__name(
|
|
2023
|
-
function
|
|
1698
|
+
__name(_ts_decorate8, "_ts_decorate");
|
|
1699
|
+
function _ts_metadata8(k, v) {
|
|
2024
1700
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2025
1701
|
}
|
|
2026
|
-
__name(
|
|
1702
|
+
__name(_ts_metadata8, "_ts_metadata");
|
|
2027
1703
|
var PROJECT_KEY_PATTERN2 = /^[a-z][a-z0-9-]*$/;
|
|
2028
1704
|
var ISO_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}/;
|
|
2029
1705
|
var TYPES = [
|
|
@@ -2048,12 +1724,12 @@ var ListPromotionsQueryDto = class {
|
|
|
2048
1724
|
}
|
|
2049
1725
|
projectKey;
|
|
2050
1726
|
};
|
|
2051
|
-
|
|
1727
|
+
_ts_decorate8([
|
|
2052
1728
|
IsString2(),
|
|
2053
1729
|
Matches2(PROJECT_KEY_PATTERN2, {
|
|
2054
1730
|
message: "projectKey muss kebab-case sein"
|
|
2055
1731
|
}),
|
|
2056
|
-
|
|
1732
|
+
_ts_metadata8("design:type", String)
|
|
2057
1733
|
], ListPromotionsQueryDto.prototype, "projectKey", void 0);
|
|
2058
1734
|
var CreatePromotionDto = class {
|
|
2059
1735
|
static {
|
|
@@ -2076,96 +1752,96 @@ var CreatePromotionDto = class {
|
|
|
2076
1752
|
color;
|
|
2077
1753
|
i18n;
|
|
2078
1754
|
};
|
|
2079
|
-
|
|
1755
|
+
_ts_decorate8([
|
|
2080
1756
|
IsString2(),
|
|
2081
1757
|
Matches2(PROJECT_KEY_PATTERN2),
|
|
2082
1758
|
MaxLength2(64),
|
|
2083
|
-
|
|
1759
|
+
_ts_metadata8("design:type", String)
|
|
2084
1760
|
], CreatePromotionDto.prototype, "projectKey", void 0);
|
|
2085
|
-
|
|
1761
|
+
_ts_decorate8([
|
|
2086
1762
|
IsString2(),
|
|
2087
1763
|
MaxLength2(120),
|
|
2088
|
-
|
|
1764
|
+
_ts_metadata8("design:type", String)
|
|
2089
1765
|
], CreatePromotionDto.prototype, "internalLabel", void 0);
|
|
2090
|
-
|
|
1766
|
+
_ts_decorate8([
|
|
2091
1767
|
IsString2(),
|
|
2092
1768
|
IsIn2(TYPES),
|
|
2093
|
-
|
|
1769
|
+
_ts_metadata8("design:type", typeof PromotionType === "undefined" ? Object : PromotionType)
|
|
2094
1770
|
], CreatePromotionDto.prototype, "type", void 0);
|
|
2095
|
-
|
|
1771
|
+
_ts_decorate8([
|
|
2096
1772
|
IsDefined(),
|
|
2097
|
-
|
|
1773
|
+
_ts_metadata8("design:type", typeof PromotionValue === "undefined" ? Object : PromotionValue)
|
|
2098
1774
|
], CreatePromotionDto.prototype, "value", void 0);
|
|
2099
|
-
|
|
1775
|
+
_ts_decorate8([
|
|
2100
1776
|
IsOptional2(),
|
|
2101
1777
|
IsArray(),
|
|
2102
1778
|
IsString2({
|
|
2103
1779
|
each: true
|
|
2104
1780
|
}),
|
|
2105
|
-
|
|
1781
|
+
_ts_metadata8("design:type", Array)
|
|
2106
1782
|
], CreatePromotionDto.prototype, "appliesTo", void 0);
|
|
2107
|
-
|
|
1783
|
+
_ts_decorate8([
|
|
2108
1784
|
IsOptional2(),
|
|
2109
1785
|
IsString2(),
|
|
2110
1786
|
IsIn2(TARGET_TYPES),
|
|
2111
|
-
|
|
1787
|
+
_ts_metadata8("design:type", typeof PromotionTargetType === "undefined" ? Object : PromotionTargetType)
|
|
2112
1788
|
], CreatePromotionDto.prototype, "targetType", void 0);
|
|
2113
|
-
|
|
1789
|
+
_ts_decorate8([
|
|
2114
1790
|
IsOptional2(),
|
|
2115
1791
|
IsString2(),
|
|
2116
1792
|
IsIn2(CYCLES),
|
|
2117
|
-
|
|
1793
|
+
_ts_metadata8("design:type", typeof PromotionBillingCycle === "undefined" ? Object : PromotionBillingCycle)
|
|
2118
1794
|
], CreatePromotionDto.prototype, "billingCycle", void 0);
|
|
2119
|
-
|
|
1795
|
+
_ts_decorate8([
|
|
2120
1796
|
IsString2(),
|
|
2121
1797
|
Matches2(ISO_DATE_PATTERN, {
|
|
2122
1798
|
message: "validFrom muss ISO-Datum sein"
|
|
2123
1799
|
}),
|
|
2124
|
-
|
|
1800
|
+
_ts_metadata8("design:type", String)
|
|
2125
1801
|
], CreatePromotionDto.prototype, "validFrom", void 0);
|
|
2126
|
-
|
|
1802
|
+
_ts_decorate8([
|
|
2127
1803
|
IsString2(),
|
|
2128
1804
|
Matches2(ISO_DATE_PATTERN, {
|
|
2129
1805
|
message: "validTo muss ISO-Datum sein"
|
|
2130
1806
|
}),
|
|
2131
|
-
|
|
1807
|
+
_ts_metadata8("design:type", String)
|
|
2132
1808
|
], CreatePromotionDto.prototype, "validTo", void 0);
|
|
2133
|
-
|
|
1809
|
+
_ts_decorate8([
|
|
2134
1810
|
IsOptional2(),
|
|
2135
1811
|
IsInt(),
|
|
2136
|
-
|
|
1812
|
+
_ts_metadata8("design:type", Number)
|
|
2137
1813
|
], CreatePromotionDto.prototype, "priority", void 0);
|
|
2138
|
-
|
|
1814
|
+
_ts_decorate8([
|
|
2139
1815
|
IsOptional2(),
|
|
2140
1816
|
IsArray(),
|
|
2141
1817
|
IsString2({
|
|
2142
1818
|
each: true
|
|
2143
1819
|
}),
|
|
2144
|
-
|
|
1820
|
+
_ts_metadata8("design:type", Object)
|
|
2145
1821
|
], CreatePromotionDto.prototype, "onlyLocales", void 0);
|
|
2146
|
-
|
|
1822
|
+
_ts_decorate8([
|
|
2147
1823
|
IsOptional2(),
|
|
2148
1824
|
IsBoolean(),
|
|
2149
|
-
|
|
1825
|
+
_ts_metadata8("design:type", Boolean)
|
|
2150
1826
|
], CreatePromotionDto.prototype, "requiresCoupon", void 0);
|
|
2151
|
-
|
|
1827
|
+
_ts_decorate8([
|
|
2152
1828
|
IsOptional2(),
|
|
2153
1829
|
IsArray(),
|
|
2154
1830
|
IsString2({
|
|
2155
1831
|
each: true
|
|
2156
1832
|
}),
|
|
2157
|
-
|
|
1833
|
+
_ts_metadata8("design:type", Array)
|
|
2158
1834
|
], CreatePromotionDto.prototype, "codes", void 0);
|
|
2159
|
-
|
|
1835
|
+
_ts_decorate8([
|
|
2160
1836
|
IsOptional2(),
|
|
2161
1837
|
IsString2(),
|
|
2162
1838
|
MaxLength2(16),
|
|
2163
|
-
|
|
1839
|
+
_ts_metadata8("design:type", String)
|
|
2164
1840
|
], CreatePromotionDto.prototype, "color", void 0);
|
|
2165
|
-
|
|
1841
|
+
_ts_decorate8([
|
|
2166
1842
|
IsOptional2(),
|
|
2167
1843
|
IsObject2(),
|
|
2168
|
-
|
|
1844
|
+
_ts_metadata8("design:type", typeof PromotionI18n === "undefined" ? Object : PromotionI18n)
|
|
2169
1845
|
], CreatePromotionDto.prototype, "i18n", void 0);
|
|
2170
1846
|
var UpdatePromotionDto = class {
|
|
2171
1847
|
static {
|
|
@@ -2186,110 +1862,110 @@ var UpdatePromotionDto = class {
|
|
|
2186
1862
|
color;
|
|
2187
1863
|
i18n;
|
|
2188
1864
|
};
|
|
2189
|
-
|
|
1865
|
+
_ts_decorate8([
|
|
2190
1866
|
IsOptional2(),
|
|
2191
1867
|
IsString2(),
|
|
2192
1868
|
MaxLength2(120),
|
|
2193
|
-
|
|
1869
|
+
_ts_metadata8("design:type", String)
|
|
2194
1870
|
], UpdatePromotionDto.prototype, "internalLabel", void 0);
|
|
2195
|
-
|
|
1871
|
+
_ts_decorate8([
|
|
2196
1872
|
IsOptional2(),
|
|
2197
1873
|
IsString2(),
|
|
2198
1874
|
IsIn2(TYPES),
|
|
2199
|
-
|
|
1875
|
+
_ts_metadata8("design:type", typeof PromotionType === "undefined" ? Object : PromotionType)
|
|
2200
1876
|
], UpdatePromotionDto.prototype, "type", void 0);
|
|
2201
|
-
|
|
1877
|
+
_ts_decorate8([
|
|
2202
1878
|
IsOptional2(),
|
|
2203
|
-
|
|
1879
|
+
_ts_metadata8("design:type", typeof PromotionValue === "undefined" ? Object : PromotionValue)
|
|
2204
1880
|
], UpdatePromotionDto.prototype, "value", void 0);
|
|
2205
|
-
|
|
1881
|
+
_ts_decorate8([
|
|
2206
1882
|
IsOptional2(),
|
|
2207
1883
|
IsArray(),
|
|
2208
1884
|
IsString2({
|
|
2209
1885
|
each: true
|
|
2210
1886
|
}),
|
|
2211
|
-
|
|
1887
|
+
_ts_metadata8("design:type", Array)
|
|
2212
1888
|
], UpdatePromotionDto.prototype, "appliesTo", void 0);
|
|
2213
|
-
|
|
1889
|
+
_ts_decorate8([
|
|
2214
1890
|
IsOptional2(),
|
|
2215
1891
|
IsString2(),
|
|
2216
1892
|
IsIn2(TARGET_TYPES),
|
|
2217
|
-
|
|
1893
|
+
_ts_metadata8("design:type", typeof PromotionTargetType === "undefined" ? Object : PromotionTargetType)
|
|
2218
1894
|
], UpdatePromotionDto.prototype, "targetType", void 0);
|
|
2219
|
-
|
|
1895
|
+
_ts_decorate8([
|
|
2220
1896
|
IsOptional2(),
|
|
2221
1897
|
IsString2(),
|
|
2222
1898
|
IsIn2(CYCLES),
|
|
2223
|
-
|
|
1899
|
+
_ts_metadata8("design:type", typeof PromotionBillingCycle === "undefined" ? Object : PromotionBillingCycle)
|
|
2224
1900
|
], UpdatePromotionDto.prototype, "billingCycle", void 0);
|
|
2225
|
-
|
|
1901
|
+
_ts_decorate8([
|
|
2226
1902
|
IsOptional2(),
|
|
2227
1903
|
IsString2(),
|
|
2228
1904
|
Matches2(ISO_DATE_PATTERN),
|
|
2229
|
-
|
|
1905
|
+
_ts_metadata8("design:type", String)
|
|
2230
1906
|
], UpdatePromotionDto.prototype, "validFrom", void 0);
|
|
2231
|
-
|
|
1907
|
+
_ts_decorate8([
|
|
2232
1908
|
IsOptional2(),
|
|
2233
1909
|
IsString2(),
|
|
2234
1910
|
Matches2(ISO_DATE_PATTERN),
|
|
2235
|
-
|
|
1911
|
+
_ts_metadata8("design:type", String)
|
|
2236
1912
|
], UpdatePromotionDto.prototype, "validTo", void 0);
|
|
2237
|
-
|
|
1913
|
+
_ts_decorate8([
|
|
2238
1914
|
IsOptional2(),
|
|
2239
1915
|
IsInt(),
|
|
2240
|
-
|
|
1916
|
+
_ts_metadata8("design:type", Number)
|
|
2241
1917
|
], UpdatePromotionDto.prototype, "priority", void 0);
|
|
2242
|
-
|
|
1918
|
+
_ts_decorate8([
|
|
2243
1919
|
IsOptional2(),
|
|
2244
1920
|
IsArray(),
|
|
2245
1921
|
IsString2({
|
|
2246
1922
|
each: true
|
|
2247
1923
|
}),
|
|
2248
|
-
|
|
1924
|
+
_ts_metadata8("design:type", Object)
|
|
2249
1925
|
], UpdatePromotionDto.prototype, "onlyLocales", void 0);
|
|
2250
|
-
|
|
1926
|
+
_ts_decorate8([
|
|
2251
1927
|
IsOptional2(),
|
|
2252
1928
|
IsBoolean(),
|
|
2253
|
-
|
|
1929
|
+
_ts_metadata8("design:type", Boolean)
|
|
2254
1930
|
], UpdatePromotionDto.prototype, "requiresCoupon", void 0);
|
|
2255
|
-
|
|
1931
|
+
_ts_decorate8([
|
|
2256
1932
|
IsOptional2(),
|
|
2257
1933
|
IsArray(),
|
|
2258
1934
|
IsString2({
|
|
2259
1935
|
each: true
|
|
2260
1936
|
}),
|
|
2261
|
-
|
|
1937
|
+
_ts_metadata8("design:type", Array)
|
|
2262
1938
|
], UpdatePromotionDto.prototype, "codes", void 0);
|
|
2263
|
-
|
|
1939
|
+
_ts_decorate8([
|
|
2264
1940
|
IsOptional2(),
|
|
2265
1941
|
IsString2(),
|
|
2266
1942
|
MaxLength2(16),
|
|
2267
|
-
|
|
1943
|
+
_ts_metadata8("design:type", String)
|
|
2268
1944
|
], UpdatePromotionDto.prototype, "color", void 0);
|
|
2269
|
-
|
|
1945
|
+
_ts_decorate8([
|
|
2270
1946
|
IsOptional2(),
|
|
2271
1947
|
IsObject2(),
|
|
2272
|
-
|
|
1948
|
+
_ts_metadata8("design:type", typeof PromotionI18n === "undefined" ? Object : PromotionI18n)
|
|
2273
1949
|
], UpdatePromotionDto.prototype, "i18n", void 0);
|
|
2274
1950
|
|
|
2275
1951
|
// src/catalog/promotions.controller.ts
|
|
2276
|
-
function
|
|
1952
|
+
function _ts_decorate9(decorators, target, key, desc) {
|
|
2277
1953
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2278
1954
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2279
1955
|
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;
|
|
2280
1956
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2281
1957
|
}
|
|
2282
|
-
__name(
|
|
2283
|
-
function
|
|
1958
|
+
__name(_ts_decorate9, "_ts_decorate");
|
|
1959
|
+
function _ts_metadata9(k, v) {
|
|
2284
1960
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2285
1961
|
}
|
|
2286
|
-
__name(
|
|
2287
|
-
function
|
|
1962
|
+
__name(_ts_metadata9, "_ts_metadata");
|
|
1963
|
+
function _ts_param7(paramIndex, decorator) {
|
|
2288
1964
|
return function(target, key) {
|
|
2289
1965
|
decorator(target, key, paramIndex);
|
|
2290
1966
|
};
|
|
2291
1967
|
}
|
|
2292
|
-
__name(
|
|
1968
|
+
__name(_ts_param7, "_ts_param");
|
|
2293
1969
|
function buildPromotionsController(guards) {
|
|
2294
1970
|
let GeneratedPromotionsController = class GeneratedPromotionsController {
|
|
2295
1971
|
static {
|
|
@@ -2315,60 +1991,60 @@ function buildPromotionsController(guards) {
|
|
|
2315
1991
|
await this.service.delete(id);
|
|
2316
1992
|
}
|
|
2317
1993
|
};
|
|
2318
|
-
|
|
1994
|
+
_ts_decorate9([
|
|
2319
1995
|
Get2(),
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
1996
|
+
_ts_param7(0, Query2()),
|
|
1997
|
+
_ts_metadata9("design:type", Function),
|
|
1998
|
+
_ts_metadata9("design:paramtypes", [
|
|
2323
1999
|
typeof ListPromotionsQueryDto === "undefined" ? Object : ListPromotionsQueryDto
|
|
2324
2000
|
]),
|
|
2325
|
-
|
|
2001
|
+
_ts_metadata9("design:returntype", void 0)
|
|
2326
2002
|
], GeneratedPromotionsController.prototype, "list", null);
|
|
2327
|
-
|
|
2003
|
+
_ts_decorate9([
|
|
2328
2004
|
Get2(":id"),
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2005
|
+
_ts_param7(0, Param2("id", new ParseUUIDPipe())),
|
|
2006
|
+
_ts_metadata9("design:type", Function),
|
|
2007
|
+
_ts_metadata9("design:paramtypes", [
|
|
2332
2008
|
String
|
|
2333
2009
|
]),
|
|
2334
|
-
|
|
2010
|
+
_ts_metadata9("design:returntype", void 0)
|
|
2335
2011
|
], GeneratedPromotionsController.prototype, "getById", null);
|
|
2336
|
-
|
|
2012
|
+
_ts_decorate9([
|
|
2337
2013
|
Post2(),
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2014
|
+
_ts_param7(0, Body2()),
|
|
2015
|
+
_ts_metadata9("design:type", Function),
|
|
2016
|
+
_ts_metadata9("design:paramtypes", [
|
|
2341
2017
|
typeof CreatePromotionDto === "undefined" ? Object : CreatePromotionDto
|
|
2342
2018
|
]),
|
|
2343
|
-
|
|
2019
|
+
_ts_metadata9("design:returntype", void 0)
|
|
2344
2020
|
], GeneratedPromotionsController.prototype, "create", null);
|
|
2345
|
-
|
|
2021
|
+
_ts_decorate9([
|
|
2346
2022
|
Patch2(":id"),
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2023
|
+
_ts_param7(0, Param2("id", new ParseUUIDPipe())),
|
|
2024
|
+
_ts_param7(1, Body2()),
|
|
2025
|
+
_ts_metadata9("design:type", Function),
|
|
2026
|
+
_ts_metadata9("design:paramtypes", [
|
|
2351
2027
|
String,
|
|
2352
2028
|
typeof UpdatePromotionDto === "undefined" ? Object : UpdatePromotionDto
|
|
2353
2029
|
]),
|
|
2354
|
-
|
|
2030
|
+
_ts_metadata9("design:returntype", void 0)
|
|
2355
2031
|
], GeneratedPromotionsController.prototype, "update", null);
|
|
2356
|
-
|
|
2032
|
+
_ts_decorate9([
|
|
2357
2033
|
Delete(":id"),
|
|
2358
2034
|
HttpCode(HttpStatus.NO_CONTENT),
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2035
|
+
_ts_param7(0, Param2("id", new ParseUUIDPipe())),
|
|
2036
|
+
_ts_metadata9("design:type", Function),
|
|
2037
|
+
_ts_metadata9("design:paramtypes", [
|
|
2362
2038
|
String
|
|
2363
2039
|
]),
|
|
2364
|
-
|
|
2040
|
+
_ts_metadata9("design:returntype", Promise)
|
|
2365
2041
|
], GeneratedPromotionsController.prototype, "remove", null);
|
|
2366
|
-
GeneratedPromotionsController =
|
|
2042
|
+
GeneratedPromotionsController = _ts_decorate9([
|
|
2367
2043
|
Controller2("admin/catalog/promotions"),
|
|
2368
2044
|
UseGuards2(...guards),
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2045
|
+
_ts_param7(0, Inject7(PromotionsService)),
|
|
2046
|
+
_ts_metadata9("design:type", Function),
|
|
2047
|
+
_ts_metadata9("design:paramtypes", [
|
|
2372
2048
|
typeof PromotionsService === "undefined" ? Object : PromotionsService
|
|
2373
2049
|
])
|
|
2374
2050
|
], GeneratedPromotionsController);
|
|
@@ -2377,24 +2053,24 @@ function buildPromotionsController(guards) {
|
|
|
2377
2053
|
__name(buildPromotionsController, "buildPromotionsController");
|
|
2378
2054
|
|
|
2379
2055
|
// src/catalog/marketing-settings.service.ts
|
|
2380
|
-
import { Inject as
|
|
2381
|
-
function
|
|
2056
|
+
import { Inject as Inject8, Injectable as Injectable6 } from "@nestjs/common";
|
|
2057
|
+
function _ts_decorate10(decorators, target, key, desc) {
|
|
2382
2058
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2383
2059
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2384
2060
|
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;
|
|
2385
2061
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2386
2062
|
}
|
|
2387
|
-
__name(
|
|
2388
|
-
function
|
|
2063
|
+
__name(_ts_decorate10, "_ts_decorate");
|
|
2064
|
+
function _ts_metadata10(k, v) {
|
|
2389
2065
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2390
2066
|
}
|
|
2391
|
-
__name(
|
|
2392
|
-
function
|
|
2067
|
+
__name(_ts_metadata10, "_ts_metadata");
|
|
2068
|
+
function _ts_param8(paramIndex, decorator) {
|
|
2393
2069
|
return function(target, key) {
|
|
2394
2070
|
decorator(target, key, paramIndex);
|
|
2395
2071
|
};
|
|
2396
2072
|
}
|
|
2397
|
-
__name(
|
|
2073
|
+
__name(_ts_param8, "_ts_param");
|
|
2398
2074
|
var MarketingSettingsService = class {
|
|
2399
2075
|
static {
|
|
2400
2076
|
__name(this, "MarketingSettingsService");
|
|
@@ -2411,31 +2087,31 @@ var MarketingSettingsService = class {
|
|
|
2411
2087
|
return this.repo.upsert(projectKey, data);
|
|
2412
2088
|
}
|
|
2413
2089
|
};
|
|
2414
|
-
MarketingSettingsService =
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2090
|
+
MarketingSettingsService = _ts_decorate10([
|
|
2091
|
+
Injectable6(),
|
|
2092
|
+
_ts_param8(0, Inject8(MARKETING_SETTINGS_REPOSITORY_TOKEN)),
|
|
2093
|
+
_ts_metadata10("design:type", Function),
|
|
2094
|
+
_ts_metadata10("design:paramtypes", [
|
|
2419
2095
|
typeof MarketingSettingsRepository === "undefined" ? Object : MarketingSettingsRepository
|
|
2420
2096
|
])
|
|
2421
2097
|
], MarketingSettingsService);
|
|
2422
2098
|
|
|
2423
2099
|
// src/catalog/marketing-settings.controller.ts
|
|
2424
|
-
import { Body as Body3, Controller as Controller3, Get as Get3, Inject as
|
|
2100
|
+
import { Body as Body3, Controller as Controller3, Get as Get3, Inject as Inject9, Put, Query as Query3, UseGuards as UseGuards3 } from "@nestjs/common";
|
|
2425
2101
|
|
|
2426
2102
|
// src/catalog/dto/marketing-settings.dto.ts
|
|
2427
2103
|
import { ArrayUnique, IsArray as IsArray2, IsString as IsString3, Matches as Matches3 } from "class-validator";
|
|
2428
|
-
function
|
|
2104
|
+
function _ts_decorate11(decorators, target, key, desc) {
|
|
2429
2105
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2430
2106
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2431
2107
|
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;
|
|
2432
2108
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2433
2109
|
}
|
|
2434
|
-
__name(
|
|
2435
|
-
function
|
|
2110
|
+
__name(_ts_decorate11, "_ts_decorate");
|
|
2111
|
+
function _ts_metadata11(k, v) {
|
|
2436
2112
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2437
2113
|
}
|
|
2438
|
-
__name(
|
|
2114
|
+
__name(_ts_metadata11, "_ts_metadata");
|
|
2439
2115
|
var PROJECT_KEY_PATTERN3 = /^[a-z][a-z0-9-]*$/;
|
|
2440
2116
|
var LOCALE_PATTERN = /^[a-z]{2}(-[A-Z]{2})?$/;
|
|
2441
2117
|
var ListMarketingSettingsQueryDto = class {
|
|
@@ -2444,12 +2120,12 @@ var ListMarketingSettingsQueryDto = class {
|
|
|
2444
2120
|
}
|
|
2445
2121
|
projectKey;
|
|
2446
2122
|
};
|
|
2447
|
-
|
|
2123
|
+
_ts_decorate11([
|
|
2448
2124
|
IsString3(),
|
|
2449
2125
|
Matches3(PROJECT_KEY_PATTERN3, {
|
|
2450
2126
|
message: "projectKey muss kebab-case sein"
|
|
2451
2127
|
}),
|
|
2452
|
-
|
|
2128
|
+
_ts_metadata11("design:type", String)
|
|
2453
2129
|
], ListMarketingSettingsQueryDto.prototype, "projectKey", void 0);
|
|
2454
2130
|
var UpdateMarketingSettingsDto = class {
|
|
2455
2131
|
static {
|
|
@@ -2458,14 +2134,14 @@ var UpdateMarketingSettingsDto = class {
|
|
|
2458
2134
|
projectKey;
|
|
2459
2135
|
activeLocales;
|
|
2460
2136
|
};
|
|
2461
|
-
|
|
2137
|
+
_ts_decorate11([
|
|
2462
2138
|
IsString3(),
|
|
2463
2139
|
Matches3(PROJECT_KEY_PATTERN3, {
|
|
2464
2140
|
message: "projectKey muss kebab-case sein"
|
|
2465
2141
|
}),
|
|
2466
|
-
|
|
2142
|
+
_ts_metadata11("design:type", String)
|
|
2467
2143
|
], UpdateMarketingSettingsDto.prototype, "projectKey", void 0);
|
|
2468
|
-
|
|
2144
|
+
_ts_decorate11([
|
|
2469
2145
|
IsArray2(),
|
|
2470
2146
|
ArrayUnique(),
|
|
2471
2147
|
IsString3({
|
|
@@ -2475,27 +2151,27 @@ _ts_decorate12([
|
|
|
2475
2151
|
each: true,
|
|
2476
2152
|
message: "Locale muss ISO-639-1 sein"
|
|
2477
2153
|
}),
|
|
2478
|
-
|
|
2154
|
+
_ts_metadata11("design:type", Array)
|
|
2479
2155
|
], UpdateMarketingSettingsDto.prototype, "activeLocales", void 0);
|
|
2480
2156
|
|
|
2481
2157
|
// src/catalog/marketing-settings.controller.ts
|
|
2482
|
-
function
|
|
2158
|
+
function _ts_decorate12(decorators, target, key, desc) {
|
|
2483
2159
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2484
2160
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2485
2161
|
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;
|
|
2486
2162
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2487
2163
|
}
|
|
2488
|
-
__name(
|
|
2489
|
-
function
|
|
2164
|
+
__name(_ts_decorate12, "_ts_decorate");
|
|
2165
|
+
function _ts_metadata12(k, v) {
|
|
2490
2166
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2491
2167
|
}
|
|
2492
|
-
__name(
|
|
2493
|
-
function
|
|
2168
|
+
__name(_ts_metadata12, "_ts_metadata");
|
|
2169
|
+
function _ts_param9(paramIndex, decorator) {
|
|
2494
2170
|
return function(target, key) {
|
|
2495
2171
|
decorator(target, key, paramIndex);
|
|
2496
2172
|
};
|
|
2497
2173
|
}
|
|
2498
|
-
__name(
|
|
2174
|
+
__name(_ts_param9, "_ts_param");
|
|
2499
2175
|
function buildMarketingSettingsController(guards) {
|
|
2500
2176
|
let GeneratedMarketingSettingsController = class GeneratedMarketingSettingsController {
|
|
2501
2177
|
static {
|
|
@@ -2515,30 +2191,30 @@ function buildMarketingSettingsController(guards) {
|
|
|
2515
2191
|
});
|
|
2516
2192
|
}
|
|
2517
2193
|
};
|
|
2518
|
-
|
|
2194
|
+
_ts_decorate12([
|
|
2519
2195
|
Get3(),
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2196
|
+
_ts_param9(0, Query3()),
|
|
2197
|
+
_ts_metadata12("design:type", Function),
|
|
2198
|
+
_ts_metadata12("design:paramtypes", [
|
|
2523
2199
|
typeof ListMarketingSettingsQueryDto === "undefined" ? Object : ListMarketingSettingsQueryDto
|
|
2524
2200
|
]),
|
|
2525
|
-
|
|
2201
|
+
_ts_metadata12("design:returntype", void 0)
|
|
2526
2202
|
], GeneratedMarketingSettingsController.prototype, "get", null);
|
|
2527
|
-
|
|
2203
|
+
_ts_decorate12([
|
|
2528
2204
|
Put(),
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2205
|
+
_ts_param9(0, Body3()),
|
|
2206
|
+
_ts_metadata12("design:type", Function),
|
|
2207
|
+
_ts_metadata12("design:paramtypes", [
|
|
2532
2208
|
typeof UpdateMarketingSettingsDto === "undefined" ? Object : UpdateMarketingSettingsDto
|
|
2533
2209
|
]),
|
|
2534
|
-
|
|
2210
|
+
_ts_metadata12("design:returntype", void 0)
|
|
2535
2211
|
], GeneratedMarketingSettingsController.prototype, "update", null);
|
|
2536
|
-
GeneratedMarketingSettingsController =
|
|
2212
|
+
GeneratedMarketingSettingsController = _ts_decorate12([
|
|
2537
2213
|
Controller3("admin/catalog/marketing-settings"),
|
|
2538
2214
|
UseGuards3(...guards),
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2215
|
+
_ts_param9(0, Inject9(MarketingSettingsService)),
|
|
2216
|
+
_ts_metadata12("design:type", Function),
|
|
2217
|
+
_ts_metadata12("design:paramtypes", [
|
|
2542
2218
|
typeof MarketingSettingsService === "undefined" ? Object : MarketingSettingsService
|
|
2543
2219
|
])
|
|
2544
2220
|
], GeneratedMarketingSettingsController);
|
|
@@ -2547,25 +2223,25 @@ function buildMarketingSettingsController(guards) {
|
|
|
2547
2223
|
__name(buildMarketingSettingsController, "buildMarketingSettingsController");
|
|
2548
2224
|
|
|
2549
2225
|
// src/catalog/public-marketing-catalog.service.ts
|
|
2550
|
-
import { Inject as
|
|
2226
|
+
import { Inject as Inject10, Injectable as Injectable7, Optional as Optional5 } from "@nestjs/common";
|
|
2551
2227
|
import { applyPromo, buildFeatureRequiresIndex, collectUnsatisfiedRequires, pickActivePromo } from "@saasicat/types";
|
|
2552
|
-
function
|
|
2228
|
+
function _ts_decorate13(decorators, target, key, desc) {
|
|
2553
2229
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2554
2230
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2555
2231
|
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;
|
|
2556
2232
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2557
2233
|
}
|
|
2558
|
-
__name(
|
|
2559
|
-
function
|
|
2234
|
+
__name(_ts_decorate13, "_ts_decorate");
|
|
2235
|
+
function _ts_metadata13(k, v) {
|
|
2560
2236
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2561
2237
|
}
|
|
2562
|
-
__name(
|
|
2563
|
-
function
|
|
2238
|
+
__name(_ts_metadata13, "_ts_metadata");
|
|
2239
|
+
function _ts_param10(paramIndex, decorator) {
|
|
2564
2240
|
return function(target, key) {
|
|
2565
2241
|
decorator(target, key, paramIndex);
|
|
2566
2242
|
};
|
|
2567
2243
|
}
|
|
2568
|
-
__name(
|
|
2244
|
+
__name(_ts_param10, "_ts_param");
|
|
2569
2245
|
var DEFAULT_LOCALE = "de";
|
|
2570
2246
|
function toNumber(decimal) {
|
|
2571
2247
|
if (decimal === null) return null;
|
|
@@ -2866,17 +2542,17 @@ var PublicMarketingCatalogService = class {
|
|
|
2866
2542
|
};
|
|
2867
2543
|
}
|
|
2868
2544
|
};
|
|
2869
|
-
PublicMarketingCatalogService =
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2545
|
+
PublicMarketingCatalogService = _ts_decorate13([
|
|
2546
|
+
Injectable7(),
|
|
2547
|
+
_ts_param10(0, Inject10(PLAN_REPOSITORY_TOKEN)),
|
|
2548
|
+
_ts_param10(1, Inject10(MARKETING_PROJECTION_REPOSITORY_TOKEN)),
|
|
2549
|
+
_ts_param10(2, Inject10(PROMOTION_REPOSITORY_TOKEN)),
|
|
2550
|
+
_ts_param10(3, Optional5()),
|
|
2551
|
+
_ts_param10(3, Inject10(CATALOG_ENTRY_REPOSITORY_TOKEN)),
|
|
2552
|
+
_ts_param10(4, Optional5()),
|
|
2553
|
+
_ts_param10(4, Inject10(BUNDLE_REPOSITORY_TOKEN)),
|
|
2554
|
+
_ts_metadata13("design:type", Function),
|
|
2555
|
+
_ts_metadata13("design:paramtypes", [
|
|
2880
2556
|
typeof PlanRepository === "undefined" ? Object : PlanRepository,
|
|
2881
2557
|
typeof MarketingProjectionRepository === "undefined" ? Object : MarketingProjectionRepository,
|
|
2882
2558
|
typeof PromotionRepository === "undefined" ? Object : PromotionRepository,
|
|
@@ -2886,24 +2562,24 @@ PublicMarketingCatalogService = _ts_decorate14([
|
|
|
2886
2562
|
], PublicMarketingCatalogService);
|
|
2887
2563
|
|
|
2888
2564
|
// src/catalog/public-marketing-catalog.controller.ts
|
|
2889
|
-
import { Controller as Controller4, Get as Get4, Inject as
|
|
2890
|
-
function
|
|
2565
|
+
import { Controller as Controller4, Get as Get4, Inject as Inject11, Query as Query4, UseGuards as UseGuards4 } from "@nestjs/common";
|
|
2566
|
+
function _ts_decorate14(decorators, target, key, desc) {
|
|
2891
2567
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2892
2568
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2893
2569
|
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;
|
|
2894
2570
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2895
2571
|
}
|
|
2896
|
-
__name(
|
|
2897
|
-
function
|
|
2572
|
+
__name(_ts_decorate14, "_ts_decorate");
|
|
2573
|
+
function _ts_metadata14(k, v) {
|
|
2898
2574
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2899
2575
|
}
|
|
2900
|
-
__name(
|
|
2901
|
-
function
|
|
2576
|
+
__name(_ts_metadata14, "_ts_metadata");
|
|
2577
|
+
function _ts_param11(paramIndex, decorator) {
|
|
2902
2578
|
return function(target, key) {
|
|
2903
2579
|
decorator(target, key, paramIndex);
|
|
2904
2580
|
};
|
|
2905
2581
|
}
|
|
2906
|
-
__name(
|
|
2582
|
+
__name(_ts_param11, "_ts_param");
|
|
2907
2583
|
function buildPublicMarketingCatalogController(guards, projectKey, currency, vatRate) {
|
|
2908
2584
|
let GeneratedPublicMarketingCatalogController = class GeneratedPublicMarketingCatalogController {
|
|
2909
2585
|
static {
|
|
@@ -2926,25 +2602,25 @@ function buildPublicMarketingCatalogController(guards, projectKey, currency, vat
|
|
|
2926
2602
|
return this.service.getCatalog(projectKey, locale, currency, vatRate, asOf);
|
|
2927
2603
|
}
|
|
2928
2604
|
};
|
|
2929
|
-
|
|
2605
|
+
_ts_decorate14([
|
|
2930
2606
|
Get4(),
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2607
|
+
_ts_param11(0, Query4("lang")),
|
|
2608
|
+
_ts_param11(1, Query4("locale")),
|
|
2609
|
+
_ts_param11(2, Query4("asOf")),
|
|
2610
|
+
_ts_metadata14("design:type", Function),
|
|
2611
|
+
_ts_metadata14("design:paramtypes", [
|
|
2936
2612
|
String,
|
|
2937
2613
|
String,
|
|
2938
2614
|
String
|
|
2939
2615
|
]),
|
|
2940
|
-
|
|
2616
|
+
_ts_metadata14("design:returntype", void 0)
|
|
2941
2617
|
], GeneratedPublicMarketingCatalogController.prototype, "getCatalog", null);
|
|
2942
|
-
GeneratedPublicMarketingCatalogController =
|
|
2618
|
+
GeneratedPublicMarketingCatalogController = _ts_decorate14([
|
|
2943
2619
|
Controller4("public/marketing-catalog"),
|
|
2944
2620
|
UseGuards4(...guards),
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2621
|
+
_ts_param11(0, Inject11(PublicMarketingCatalogService)),
|
|
2622
|
+
_ts_metadata14("design:type", Function),
|
|
2623
|
+
_ts_metadata14("design:paramtypes", [
|
|
2948
2624
|
typeof PublicMarketingCatalogService === "undefined" ? Object : PublicMarketingCatalogService
|
|
2949
2625
|
])
|
|
2950
2626
|
], GeneratedPublicMarketingCatalogController);
|
|
@@ -2959,24 +2635,24 @@ function parseAsOf(raw) {
|
|
|
2959
2635
|
__name(parseAsOf, "parseAsOf");
|
|
2960
2636
|
|
|
2961
2637
|
// src/catalog/plans.service.ts
|
|
2962
|
-
import { Inject as
|
|
2963
|
-
function
|
|
2638
|
+
import { Inject as Inject12, Injectable as Injectable8, NotFoundException as NotFoundException5, Optional as Optional6, UnprocessableEntityException as UnprocessableEntityException3 } from "@nestjs/common";
|
|
2639
|
+
function _ts_decorate15(decorators, target, key, desc) {
|
|
2964
2640
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2965
2641
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2966
2642
|
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;
|
|
2967
2643
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2968
2644
|
}
|
|
2969
|
-
__name(
|
|
2970
|
-
function
|
|
2645
|
+
__name(_ts_decorate15, "_ts_decorate");
|
|
2646
|
+
function _ts_metadata15(k, v) {
|
|
2971
2647
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2972
2648
|
}
|
|
2973
|
-
__name(
|
|
2974
|
-
function
|
|
2649
|
+
__name(_ts_metadata15, "_ts_metadata");
|
|
2650
|
+
function _ts_param12(paramIndex, decorator) {
|
|
2975
2651
|
return function(target, key) {
|
|
2976
2652
|
decorator(target, key, paramIndex);
|
|
2977
2653
|
};
|
|
2978
2654
|
}
|
|
2979
|
-
__name(
|
|
2655
|
+
__name(_ts_param12, "_ts_param");
|
|
2980
2656
|
var PlansService = class {
|
|
2981
2657
|
static {
|
|
2982
2658
|
__name(this, "PlansService");
|
|
@@ -3006,24 +2682,24 @@ var PlansService = class {
|
|
|
3006
2682
|
}
|
|
3007
2683
|
async getPlan(planId) {
|
|
3008
2684
|
const plan = await this.repo.findById(planId);
|
|
3009
|
-
if (!plan) throw new
|
|
2685
|
+
if (!plan) throw new NotFoundException5(`Plan '${planId}' nicht gefunden`);
|
|
3010
2686
|
return plan;
|
|
3011
2687
|
}
|
|
3012
2688
|
async createPlan(data) {
|
|
3013
2689
|
const existing = await this.repo.findByKey(data.projectKey, data.planKey);
|
|
3014
2690
|
if (existing) {
|
|
3015
|
-
throw new
|
|
2691
|
+
throw new UnprocessableEntityException3(`Plan '${data.planKey}' existiert bereits in Projekt '${data.projectKey}'`);
|
|
3016
2692
|
}
|
|
3017
2693
|
return this.repo.create(data);
|
|
3018
2694
|
}
|
|
3019
2695
|
async updatePlan(planId, data) {
|
|
3020
2696
|
const existing = await this.repo.findById(planId);
|
|
3021
|
-
if (!existing) throw new
|
|
2697
|
+
if (!existing) throw new NotFoundException5(`Plan '${planId}' nicht gefunden`);
|
|
3022
2698
|
return this.repo.update(planId, data);
|
|
3023
2699
|
}
|
|
3024
2700
|
async softDeletePlan(planId) {
|
|
3025
2701
|
const existing = await this.repo.findById(planId);
|
|
3026
|
-
if (!existing) throw new
|
|
2702
|
+
if (!existing) throw new NotFoundException5(`Plan '${planId}' nicht gefunden`);
|
|
3027
2703
|
if (existing.deletedAt !== null) return;
|
|
3028
2704
|
await this.assertNoPublishedVersions(existing.planKey, "soft-delete");
|
|
3029
2705
|
await this.repo.softDelete(planId);
|
|
@@ -3040,11 +2716,11 @@ var PlansService = class {
|
|
|
3040
2716
|
*/
|
|
3041
2717
|
async hardDeletePlan(planId) {
|
|
3042
2718
|
const existing = await this.repo.findById(planId);
|
|
3043
|
-
if (!existing) throw new
|
|
2719
|
+
if (!existing) throw new NotFoundException5(`Plan '${planId}' nicht gefunden`);
|
|
3044
2720
|
await this.assertNoPublishedVersions(existing.planKey, "hard-delete");
|
|
3045
2721
|
await this.assertNoDrafts(existing.planKey);
|
|
3046
2722
|
if (typeof this.repo.hardDelete !== "function") {
|
|
3047
|
-
throw new
|
|
2723
|
+
throw new UnprocessableEntityException3({
|
|
3048
2724
|
code: "PLAN_HARD_DELETE_NOT_IMPLEMENTED",
|
|
3049
2725
|
message: "Hartes L\xF6schen ist im aktuellen Repository nicht implementiert. Implementiere PlanRepository.hardDelete."
|
|
3050
2726
|
});
|
|
@@ -3065,7 +2741,7 @@ var PlansService = class {
|
|
|
3065
2741
|
if (published.length === 0) return;
|
|
3066
2742
|
const live = published.filter((v) => v.supersededAt === null).length;
|
|
3067
2743
|
const superseded = published.length - live;
|
|
3068
|
-
throw new
|
|
2744
|
+
throw new UnprocessableEntityException3({
|
|
3069
2745
|
code: "PLAN_HAS_PUBLISHED_VERSIONS",
|
|
3070
2746
|
message: `Plan '${planKey}' kann nicht ${op === "hard-delete" ? "gel\xF6scht" : "archiviert"} werden \u2014 der Plan hat ${published.length} published Version(en) (${live} live, ${superseded} superseded). Bestand-Subscriptions referenzieren diese Versionen (Vertragsschutz P1), der Plan-Stamm muss erhalten bleiben.`,
|
|
3071
2747
|
publishedCount: published.length,
|
|
@@ -3078,45 +2754,45 @@ var PlansService = class {
|
|
|
3078
2754
|
const versions = await this.repo.listVersions(planKey);
|
|
3079
2755
|
const drafts = versions.filter((v) => v.publishedAt === null);
|
|
3080
2756
|
if (drafts.length === 0) return;
|
|
3081
|
-
throw new
|
|
2757
|
+
throw new UnprocessableEntityException3({
|
|
3082
2758
|
code: "PLAN_HAS_DRAFTS",
|
|
3083
2759
|
message: `Plan '${planKey}' hat noch ${drafts.length} offene Draft-Version(en). Verwerfe sie zuerst (DELETE /admin/catalog/plan-versions/:id) oder publishe sie.`,
|
|
3084
2760
|
draftCount: drafts.length
|
|
3085
2761
|
});
|
|
3086
2762
|
}
|
|
3087
2763
|
};
|
|
3088
|
-
PlansService =
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
2764
|
+
PlansService = _ts_decorate15([
|
|
2765
|
+
Injectable8(),
|
|
2766
|
+
_ts_param12(0, Inject12(PLAN_REPOSITORY_TOKEN)),
|
|
2767
|
+
_ts_param12(1, Optional6()),
|
|
2768
|
+
_ts_param12(1, Inject12(SUBSCRIPTION_REPOSITORY_TOKEN)),
|
|
2769
|
+
_ts_metadata15("design:type", Function),
|
|
2770
|
+
_ts_metadata15("design:paramtypes", [
|
|
3095
2771
|
typeof PlanRepository === "undefined" ? Object : PlanRepository,
|
|
3096
2772
|
Object
|
|
3097
2773
|
])
|
|
3098
2774
|
], PlansService);
|
|
3099
2775
|
|
|
3100
2776
|
// src/catalog/plan-versions.service.ts
|
|
3101
|
-
import { Inject as
|
|
2777
|
+
import { Inject as Inject13, Injectable as Injectable9, Logger as Logger3, NotFoundException as NotFoundException6, Optional as Optional7, UnprocessableEntityException as UnprocessableEntityException4 } from "@nestjs/common";
|
|
3102
2778
|
import { isVersionEditable as isVersionEditable2 } from "@saasicat/types";
|
|
3103
|
-
function
|
|
2779
|
+
function _ts_decorate16(decorators, target, key, desc) {
|
|
3104
2780
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3105
2781
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3106
2782
|
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;
|
|
3107
2783
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3108
2784
|
}
|
|
3109
|
-
__name(
|
|
3110
|
-
function
|
|
2785
|
+
__name(_ts_decorate16, "_ts_decorate");
|
|
2786
|
+
function _ts_metadata16(k, v) {
|
|
3111
2787
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3112
2788
|
}
|
|
3113
|
-
__name(
|
|
3114
|
-
function
|
|
2789
|
+
__name(_ts_metadata16, "_ts_metadata");
|
|
2790
|
+
function _ts_param13(paramIndex, decorator) {
|
|
3115
2791
|
return function(target, key) {
|
|
3116
2792
|
decorator(target, key, paramIndex);
|
|
3117
2793
|
};
|
|
3118
2794
|
}
|
|
3119
|
-
__name(
|
|
2795
|
+
__name(_ts_param13, "_ts_param");
|
|
3120
2796
|
var PlanVersionsService = class _PlanVersionsService {
|
|
3121
2797
|
static {
|
|
3122
2798
|
__name(this, "PlanVersionsService");
|
|
@@ -3168,16 +2844,16 @@ var PlanVersionsService = class _PlanVersionsService {
|
|
|
3168
2844
|
async discardPlanDraft(versionId) {
|
|
3169
2845
|
const existing = await this.repo.findVersionById(versionId);
|
|
3170
2846
|
if (!existing) {
|
|
3171
|
-
throw new
|
|
2847
|
+
throw new NotFoundException6(`PlanVersion '${versionId}' nicht gefunden`);
|
|
3172
2848
|
}
|
|
3173
2849
|
if (existing.publishedAt !== null) {
|
|
3174
|
-
throw new
|
|
2850
|
+
throw new UnprocessableEntityException4({
|
|
3175
2851
|
code: "PLAN_VERSION_ALREADY_PUBLISHED",
|
|
3176
2852
|
message: `PlanVersion '${versionId}' ist bereits published und kann nicht verworfen werden.`
|
|
3177
2853
|
});
|
|
3178
2854
|
}
|
|
3179
2855
|
if (typeof this.repo.deletePlanVersionDraft !== "function") {
|
|
3180
|
-
throw new
|
|
2856
|
+
throw new UnprocessableEntityException4({
|
|
3181
2857
|
code: "PLAN_VERSION_DISCARD_NOT_IMPLEMENTED",
|
|
3182
2858
|
message: "Discard ist im aktuellen Repository nicht implementiert. Implementiere PlanRepository.deletePlanVersionDraft."
|
|
3183
2859
|
});
|
|
@@ -3192,7 +2868,7 @@ var PlanVersionsService = class _PlanVersionsService {
|
|
|
3192
2868
|
async listPlanVersions(planUuid) {
|
|
3193
2869
|
const plan = await this.repo.findById(planUuid);
|
|
3194
2870
|
if (!plan) {
|
|
3195
|
-
throw new
|
|
2871
|
+
throw new NotFoundException6(`Plan '${planUuid}' nicht gefunden`);
|
|
3196
2872
|
}
|
|
3197
2873
|
const versions = await this.repo.listVersions(plan.planKey);
|
|
3198
2874
|
return this.annotateEditability(versions);
|
|
@@ -3200,7 +2876,7 @@ var PlanVersionsService = class _PlanVersionsService {
|
|
|
3200
2876
|
async getPlanVersion(versionId) {
|
|
3201
2877
|
const version = await this.repo.findVersionById(versionId);
|
|
3202
2878
|
if (!version) {
|
|
3203
|
-
throw new
|
|
2879
|
+
throw new NotFoundException6(`PlanVersion '${versionId}' nicht gefunden`);
|
|
3204
2880
|
}
|
|
3205
2881
|
const [annotated] = await this.annotateEditability([
|
|
3206
2882
|
version
|
|
@@ -3238,12 +2914,12 @@ var PlanVersionsService = class _PlanVersionsService {
|
|
|
3238
2914
|
async createPlanDraft(data) {
|
|
3239
2915
|
const plan = await this.repo.findById(data.planId);
|
|
3240
2916
|
if (!plan) {
|
|
3241
|
-
throw new
|
|
2917
|
+
throw new NotFoundException6(`Plan '${data.planId}' nicht gefunden`);
|
|
3242
2918
|
}
|
|
3243
2919
|
const planKey = plan.planKey;
|
|
3244
2920
|
const existingDraft = await this.repo.findCurrentDraft(planKey);
|
|
3245
2921
|
if (existingDraft) {
|
|
3246
|
-
throw new
|
|
2922
|
+
throw new UnprocessableEntityException4(`Plan '${planKey}' hat bereits eine Draft-Version v${existingDraft.version}; bitte erst publishen oder verwerfen`);
|
|
3247
2923
|
}
|
|
3248
2924
|
let baseVersionId = data.baseVersionId;
|
|
3249
2925
|
if (baseVersionId === void 0) {
|
|
@@ -3268,14 +2944,14 @@ var PlanVersionsService = class _PlanVersionsService {
|
|
|
3268
2944
|
async updatePlanDraft(versionId, data) {
|
|
3269
2945
|
const existing = await this.repo.findVersionById(versionId);
|
|
3270
2946
|
if (!existing) {
|
|
3271
|
-
throw new
|
|
2947
|
+
throw new NotFoundException6(`PlanVersion '${versionId}' nicht gefunden`);
|
|
3272
2948
|
}
|
|
3273
2949
|
const [annotated] = await this.annotateEditability([
|
|
3274
2950
|
existing
|
|
3275
2951
|
]);
|
|
3276
2952
|
const { editable } = isVersionEditable2(annotated);
|
|
3277
2953
|
if (!editable) {
|
|
3278
|
-
throw new
|
|
2954
|
+
throw new UnprocessableEntityException4({
|
|
3279
2955
|
code: "PLAN_VERSION_NOT_EDITABLE",
|
|
3280
2956
|
message: `PlanVersion '${versionId}' ist nicht editierbar. Editierbar sind nur Drafts und published Versionen, die latest-in-chain sind, noch keine Subscription binden und deren validFrom in der Zukunft liegt.`
|
|
3281
2957
|
});
|
|
@@ -3295,10 +2971,10 @@ var PlanVersionsService = class _PlanVersionsService {
|
|
|
3295
2971
|
async publishPlanVersion(versionId, publishMeta) {
|
|
3296
2972
|
const draft = await this.repo.findVersionById(versionId);
|
|
3297
2973
|
if (!draft) {
|
|
3298
|
-
throw new
|
|
2974
|
+
throw new NotFoundException6(`PlanVersion '${versionId}' nicht gefunden`);
|
|
3299
2975
|
}
|
|
3300
2976
|
if (draft.publishedAt !== null) {
|
|
3301
|
-
throw new
|
|
2977
|
+
throw new UnprocessableEntityException4(`PlanVersion '${versionId}' ist bereits published`);
|
|
3302
2978
|
}
|
|
3303
2979
|
const warnings = await this.runStrictCheck({
|
|
3304
2980
|
features: draft.features,
|
|
@@ -3309,7 +2985,7 @@ var PlanVersionsService = class _PlanVersionsService {
|
|
|
3309
2985
|
const monthly = Number.parseFloat(String(draft.monthlyNet ?? "0"));
|
|
3310
2986
|
const yearly = Number.parseFloat(String(draft.yearlyNet ?? "0"));
|
|
3311
2987
|
if (monthly <= 0 || yearly <= 0) {
|
|
3312
|
-
throw new
|
|
2988
|
+
throw new UnprocessableEntityException4({
|
|
3313
2989
|
code: "PLAN_VERSION_ZERO_PRICE",
|
|
3314
2990
|
message: "PlanVersion kann nicht mit Preis 0,00 published werden (Schutz gegen Seed-Platzhalter). F\xFCr bewusst kostenlose Sondervertr\xE4ge: allowZeroPrice setzen.",
|
|
3315
2991
|
monthlyNet: String(draft.monthlyNet),
|
|
@@ -3320,14 +2996,14 @@ var PlanVersionsService = class _PlanVersionsService {
|
|
|
3320
2996
|
const previous = await this.repo.findLatestLivePlanVersion(draft.planId);
|
|
3321
2997
|
const validFromInput = publishMeta.validFrom ?? draft.validFrom;
|
|
3322
2998
|
if (!validFromInput) {
|
|
3323
|
-
throw new
|
|
2999
|
+
throw new UnprocessableEntityException4({
|
|
3324
3000
|
code: "PLAN_VERSION_VALID_FROM_REQUIRED",
|
|
3325
3001
|
message: "Beim Publish muss validFrom gesetzt sein (auf Draft oder Publish-Aufruf). SPEC_V2 \xA74.2."
|
|
3326
3002
|
});
|
|
3327
3003
|
}
|
|
3328
3004
|
const validFrom = new Date(validFromInput);
|
|
3329
3005
|
if (Number.isNaN(validFrom.getTime())) {
|
|
3330
|
-
throw new
|
|
3006
|
+
throw new UnprocessableEntityException4({
|
|
3331
3007
|
code: "PLAN_VERSION_VALID_FROM_INVALID",
|
|
3332
3008
|
message: `validFrom '${validFromInput}' ist kein g\xFCltiges Datum`
|
|
3333
3009
|
});
|
|
@@ -3335,7 +3011,7 @@ var PlanVersionsService = class _PlanVersionsService {
|
|
|
3335
3011
|
if (previous?.validFrom) {
|
|
3336
3012
|
const prevFrom = new Date(previous.validFrom);
|
|
3337
3013
|
if (validFrom <= prevFrom) {
|
|
3338
|
-
throw new
|
|
3014
|
+
throw new UnprocessableEntityException4({
|
|
3339
3015
|
code: "PLAN_VERSION_VALID_FROM_NOT_AFTER_PREVIOUS",
|
|
3340
3016
|
message: `validFrom (${validFrom.toISOString()}) muss strikt nach validFrom der Vorg\xE4nger-Version (${previous.validFrom}) liegen.`
|
|
3341
3017
|
});
|
|
@@ -3345,7 +3021,7 @@ var PlanVersionsService = class _PlanVersionsService {
|
|
|
3345
3021
|
const dayMs = 24 * 60 * 60 * 1e3;
|
|
3346
3022
|
const requiredStart = new Date(prevUntil.getTime() + dayMs);
|
|
3347
3023
|
if (validFrom.getTime() !== requiredStart.getTime()) {
|
|
3348
|
-
throw new
|
|
3024
|
+
throw new UnprocessableEntityException4({
|
|
3349
3025
|
code: "PLAN_VERSION_VALID_FROM_NOT_GAPLESS",
|
|
3350
3026
|
message: `Vorg\xE4nger hat validUntil=${previous.validUntil.slice(0, 10)} \u2014 der Nachfolger muss nahtlos am Folgetag (${requiredStart.toISOString().slice(0, 10)}) starten. Geliefert: ${validFrom.toISOString().slice(0, 10)}.`,
|
|
3351
3027
|
requiredValidFrom: requiredStart.toISOString().slice(0, 10),
|
|
@@ -3357,13 +3033,13 @@ var PlanVersionsService = class _PlanVersionsService {
|
|
|
3357
3033
|
const validUntilInput = publishMeta.validUntil !== void 0 ? publishMeta.validUntil : draft.validUntil;
|
|
3358
3034
|
const validUntil = validUntilInput ? new Date(validUntilInput) : null;
|
|
3359
3035
|
if (validUntil && Number.isNaN(validUntil.getTime())) {
|
|
3360
|
-
throw new
|
|
3036
|
+
throw new UnprocessableEntityException4({
|
|
3361
3037
|
code: "PLAN_VERSION_VALID_UNTIL_INVALID",
|
|
3362
3038
|
message: `validUntil '${validUntilInput}' ist kein g\xFCltiges Datum`
|
|
3363
3039
|
});
|
|
3364
3040
|
}
|
|
3365
3041
|
if (validUntil && validUntil <= validFrom) {
|
|
3366
|
-
throw new
|
|
3042
|
+
throw new UnprocessableEntityException4({
|
|
3367
3043
|
code: "PLAN_VERSION_VALID_UNTIL_BEFORE_FROM",
|
|
3368
3044
|
message: `validUntil (${validUntil.toISOString()}) muss strikt nach validFrom (${validFrom.toISOString()}) liegen.`
|
|
3369
3045
|
});
|
|
@@ -3381,7 +3057,7 @@ var PlanVersionsService = class _PlanVersionsService {
|
|
|
3381
3057
|
nonRegressive: true
|
|
3382
3058
|
};
|
|
3383
3059
|
if (!diff.nonRegressive && !publishMeta.forceRegressive) {
|
|
3384
|
-
throw new
|
|
3060
|
+
throw new UnprocessableEntityException4({
|
|
3385
3061
|
code: "PLAN_VERSION_REGRESSION",
|
|
3386
3062
|
message: "Diese PlanVersion ist regressiv (Feature entfernt / Quota gesenkt / Preis erh\xF6ht). Publishen erfordert explizites `forceRegressive: true` (UI-Best\xE4tigungsmodal mit MFA).",
|
|
3387
3063
|
changes: diff.changes
|
|
@@ -3418,34 +3094,34 @@ var PlanVersionsService = class _PlanVersionsService {
|
|
|
3418
3094
|
async terminatePlanVersion(versionId, endsAt) {
|
|
3419
3095
|
const existing = await this.repo.findVersionById(versionId);
|
|
3420
3096
|
if (!existing) {
|
|
3421
|
-
throw new
|
|
3097
|
+
throw new NotFoundException6(`PlanVersion '${versionId}' nicht gefunden`);
|
|
3422
3098
|
}
|
|
3423
3099
|
if (existing.publishedAt === null) {
|
|
3424
|
-
throw new
|
|
3100
|
+
throw new UnprocessableEntityException4({
|
|
3425
3101
|
code: "PLAN_VERSION_NOT_LIVE",
|
|
3426
3102
|
message: `PlanVersion '${versionId}' ist nicht published und kann nicht terminiert werden.`
|
|
3427
3103
|
});
|
|
3428
3104
|
}
|
|
3429
3105
|
if (existing.supersededAt !== null) {
|
|
3430
|
-
throw new
|
|
3106
|
+
throw new UnprocessableEntityException4({
|
|
3431
3107
|
code: "PLAN_VERSION_NOT_LIVE",
|
|
3432
3108
|
message: `PlanVersion '${versionId}' wurde bereits von einer Nachfolge-Version abgel\xF6st (supersededAt) und kann nicht terminiert werden.`
|
|
3433
3109
|
});
|
|
3434
3110
|
}
|
|
3435
3111
|
if (Number.isNaN(endsAt.getTime())) {
|
|
3436
|
-
throw new
|
|
3112
|
+
throw new UnprocessableEntityException4({
|
|
3437
3113
|
code: "PLAN_TERMINATE_INVALID_DATE",
|
|
3438
3114
|
message: "endsAt ist kein g\xFCltiges Datum."
|
|
3439
3115
|
});
|
|
3440
3116
|
}
|
|
3441
3117
|
if (endsAt.getTime() <= Date.now()) {
|
|
3442
|
-
throw new
|
|
3118
|
+
throw new UnprocessableEntityException4({
|
|
3443
3119
|
code: "PLAN_TERMINATE_DATE_NOT_FUTURE",
|
|
3444
3120
|
message: `endsAt (${endsAt.toISOString()}) muss strikt in der Zukunft liegen.`
|
|
3445
3121
|
});
|
|
3446
3122
|
}
|
|
3447
3123
|
if (typeof this.repo.terminate !== "function") {
|
|
3448
|
-
throw new
|
|
3124
|
+
throw new UnprocessableEntityException4({
|
|
3449
3125
|
code: "PLAN_TERMINATE_NOT_IMPLEMENTED",
|
|
3450
3126
|
message: "Terminate ist im aktuellen Repository nicht implementiert. Implementiere PlanRepository.terminate."
|
|
3451
3127
|
});
|
|
@@ -3464,7 +3140,7 @@ var PlanVersionsService = class _PlanVersionsService {
|
|
|
3464
3140
|
gateOrPass(warnings) {
|
|
3465
3141
|
if (blockingStrictModeWarnings(warnings).length === 0) return;
|
|
3466
3142
|
if (this.mode === "blocking") {
|
|
3467
|
-
throw new
|
|
3143
|
+
throw new UnprocessableEntityException4({
|
|
3468
3144
|
code: "STRICT_MODE_VIOLATIONS",
|
|
3469
3145
|
message: "Strict-Mode-Check hat Drift gegen den Discovery-Snapshot gefunden.",
|
|
3470
3146
|
warnings
|
|
@@ -3472,21 +3148,21 @@ var PlanVersionsService = class _PlanVersionsService {
|
|
|
3472
3148
|
}
|
|
3473
3149
|
}
|
|
3474
3150
|
};
|
|
3475
|
-
PlanVersionsService =
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3151
|
+
PlanVersionsService = _ts_decorate16([
|
|
3152
|
+
Injectable9(),
|
|
3153
|
+
_ts_param13(0, Inject13(PLAN_REPOSITORY_TOKEN)),
|
|
3154
|
+
_ts_param13(1, Optional7()),
|
|
3155
|
+
_ts_param13(1, Inject13(DISCOVERY_SNAPSHOT_TOKEN)),
|
|
3156
|
+
_ts_param13(2, Optional7()),
|
|
3157
|
+
_ts_param13(2, Inject13(CATALOG_SERVICE_CONFIG_TOKEN)),
|
|
3158
|
+
_ts_param13(3, Optional7()),
|
|
3159
|
+
_ts_param13(3, Inject13(SUBSCRIPTION_REPOSITORY_TOKEN)),
|
|
3160
|
+
_ts_param13(4, Optional7()),
|
|
3161
|
+
_ts_param13(4, Inject13(DiscoveryScanner)),
|
|
3162
|
+
_ts_param13(5, Optional7()),
|
|
3163
|
+
_ts_param13(5, Inject13(CATALOG_ENTRY_REPOSITORY_TOKEN)),
|
|
3164
|
+
_ts_metadata16("design:type", Function),
|
|
3165
|
+
_ts_metadata16("design:paramtypes", [
|
|
3490
3166
|
typeof PlanRepository === "undefined" ? Object : PlanRepository,
|
|
3491
3167
|
Object,
|
|
3492
3168
|
typeof CatalogServiceConfig === "undefined" ? Object : CatalogServiceConfig,
|
|
@@ -3497,21 +3173,21 @@ PlanVersionsService = _ts_decorate17([
|
|
|
3497
3173
|
], PlanVersionsService);
|
|
3498
3174
|
|
|
3499
3175
|
// src/catalog/bundles.controller.ts
|
|
3500
|
-
import { Body as Body4, Controller as Controller5, Delete as Delete2, Get as Get5, HttpCode as HttpCode2, HttpStatus as HttpStatus2, Inject as
|
|
3176
|
+
import { Body as Body4, Controller as Controller5, Delete as Delete2, Get as Get5, HttpCode as HttpCode2, HttpStatus as HttpStatus2, Inject as Inject14, Param as Param3, ParseUUIDPipe as ParseUUIDPipe2, Patch as Patch3, Post as Post3, Query as Query5, UseGuards as UseGuards5 } from "@nestjs/common";
|
|
3501
3177
|
|
|
3502
3178
|
// src/catalog/dto/bundles.dto.ts
|
|
3503
3179
|
import { IsArray as IsArray3, IsBoolean as IsBoolean2, IsInt as IsInt2, IsNumberString, IsObject as IsObject3, IsOptional as IsOptional3, IsString as IsString4, IsUUID, Matches as Matches4, Max, MaxLength as MaxLength3, Min, MinLength, ValidateIf } from "class-validator";
|
|
3504
|
-
function
|
|
3180
|
+
function _ts_decorate17(decorators, target, key, desc) {
|
|
3505
3181
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3506
3182
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3507
3183
|
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;
|
|
3508
3184
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3509
3185
|
}
|
|
3510
|
-
__name(
|
|
3511
|
-
function
|
|
3186
|
+
__name(_ts_decorate17, "_ts_decorate");
|
|
3187
|
+
function _ts_metadata17(k, v) {
|
|
3512
3188
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3513
3189
|
}
|
|
3514
|
-
__name(
|
|
3190
|
+
__name(_ts_metadata17, "_ts_metadata");
|
|
3515
3191
|
var KEY_PATTERN = /^[A-Z][A-Z0-9_]*$/;
|
|
3516
3192
|
var FEATURE_KEY_PATTERN = /^[A-Z][A-Z0-9_]*$/;
|
|
3517
3193
|
var PROJECT_KEY_PATTERN4 = /^[a-z][a-z0-9-]*$/;
|
|
@@ -3530,51 +3206,51 @@ var CreateBundleDto = class {
|
|
|
3530
3206
|
/** Locale translations { "en": { label, description }, … }. */
|
|
3531
3207
|
i18n;
|
|
3532
3208
|
};
|
|
3533
|
-
|
|
3209
|
+
_ts_decorate17([
|
|
3534
3210
|
IsString4(),
|
|
3535
3211
|
Matches4(PROJECT_KEY_PATTERN4, {
|
|
3536
3212
|
message: 'projectKey muss kebab-case sein (z. B. "my-app")'
|
|
3537
3213
|
}),
|
|
3538
3214
|
MaxLength3(64),
|
|
3539
|
-
|
|
3215
|
+
_ts_metadata17("design:type", String)
|
|
3540
3216
|
], CreateBundleDto.prototype, "projectKey", void 0);
|
|
3541
|
-
|
|
3217
|
+
_ts_decorate17([
|
|
3542
3218
|
IsString4(),
|
|
3543
3219
|
Matches4(KEY_PATTERN, {
|
|
3544
3220
|
message: 'bundleKey muss SCREAMING_SNAKE_CASE sein (z. B. "BANKING")'
|
|
3545
3221
|
}),
|
|
3546
3222
|
MaxLength3(64),
|
|
3547
|
-
|
|
3223
|
+
_ts_metadata17("design:type", String)
|
|
3548
3224
|
], CreateBundleDto.prototype, "bundleKey", void 0);
|
|
3549
|
-
|
|
3225
|
+
_ts_decorate17([
|
|
3550
3226
|
IsString4(),
|
|
3551
3227
|
MinLength(1),
|
|
3552
3228
|
MaxLength3(120),
|
|
3553
|
-
|
|
3229
|
+
_ts_metadata17("design:type", String)
|
|
3554
3230
|
], CreateBundleDto.prototype, "label", void 0);
|
|
3555
|
-
|
|
3231
|
+
_ts_decorate17([
|
|
3556
3232
|
IsOptional3(),
|
|
3557
3233
|
IsString4(),
|
|
3558
3234
|
MaxLength3(2e3),
|
|
3559
|
-
|
|
3235
|
+
_ts_metadata17("design:type", String)
|
|
3560
3236
|
], CreateBundleDto.prototype, "description", void 0);
|
|
3561
|
-
|
|
3237
|
+
_ts_decorate17([
|
|
3562
3238
|
IsOptional3(),
|
|
3563
3239
|
IsString4(),
|
|
3564
3240
|
MaxLength3(64),
|
|
3565
|
-
|
|
3241
|
+
_ts_metadata17("design:type", String)
|
|
3566
3242
|
], CreateBundleDto.prototype, "icon", void 0);
|
|
3567
|
-
|
|
3243
|
+
_ts_decorate17([
|
|
3568
3244
|
IsOptional3(),
|
|
3569
3245
|
IsInt2(),
|
|
3570
3246
|
Min(0),
|
|
3571
3247
|
Max(1e4),
|
|
3572
|
-
|
|
3248
|
+
_ts_metadata17("design:type", Number)
|
|
3573
3249
|
], CreateBundleDto.prototype, "sortOrder", void 0);
|
|
3574
|
-
|
|
3250
|
+
_ts_decorate17([
|
|
3575
3251
|
IsOptional3(),
|
|
3576
3252
|
IsObject3(),
|
|
3577
|
-
|
|
3253
|
+
_ts_metadata17("design:type", typeof Record === "undefined" ? Object : Record)
|
|
3578
3254
|
], CreateBundleDto.prototype, "i18n", void 0);
|
|
3579
3255
|
var UpdateBundleDto = class {
|
|
3580
3256
|
static {
|
|
@@ -3587,36 +3263,36 @@ var UpdateBundleDto = class {
|
|
|
3587
3263
|
/** Locale translations { "en": { label, description }, … }. */
|
|
3588
3264
|
i18n;
|
|
3589
3265
|
};
|
|
3590
|
-
|
|
3266
|
+
_ts_decorate17([
|
|
3591
3267
|
IsOptional3(),
|
|
3592
3268
|
IsString4(),
|
|
3593
3269
|
MinLength(1),
|
|
3594
3270
|
MaxLength3(120),
|
|
3595
|
-
|
|
3271
|
+
_ts_metadata17("design:type", String)
|
|
3596
3272
|
], UpdateBundleDto.prototype, "label", void 0);
|
|
3597
|
-
|
|
3273
|
+
_ts_decorate17([
|
|
3598
3274
|
IsOptional3(),
|
|
3599
3275
|
IsString4(),
|
|
3600
3276
|
MaxLength3(2e3),
|
|
3601
|
-
|
|
3277
|
+
_ts_metadata17("design:type", Object)
|
|
3602
3278
|
], UpdateBundleDto.prototype, "description", void 0);
|
|
3603
|
-
|
|
3279
|
+
_ts_decorate17([
|
|
3604
3280
|
IsOptional3(),
|
|
3605
3281
|
IsString4(),
|
|
3606
3282
|
MaxLength3(64),
|
|
3607
|
-
|
|
3283
|
+
_ts_metadata17("design:type", Object)
|
|
3608
3284
|
], UpdateBundleDto.prototype, "icon", void 0);
|
|
3609
|
-
|
|
3285
|
+
_ts_decorate17([
|
|
3610
3286
|
IsOptional3(),
|
|
3611
3287
|
IsInt2(),
|
|
3612
3288
|
Min(0),
|
|
3613
3289
|
Max(1e4),
|
|
3614
|
-
|
|
3290
|
+
_ts_metadata17("design:type", Number)
|
|
3615
3291
|
], UpdateBundleDto.prototype, "sortOrder", void 0);
|
|
3616
|
-
|
|
3292
|
+
_ts_decorate17([
|
|
3617
3293
|
IsOptional3(),
|
|
3618
3294
|
IsObject3(),
|
|
3619
|
-
|
|
3295
|
+
_ts_metadata17("design:type", typeof Record === "undefined" ? Object : Record)
|
|
3620
3296
|
], UpdateBundleDto.prototype, "i18n", void 0);
|
|
3621
3297
|
var CreateBundleVersionDraftDto = class {
|
|
3622
3298
|
static {
|
|
@@ -3634,7 +3310,7 @@ var CreateBundleVersionDraftDto = class {
|
|
|
3634
3310
|
validFrom;
|
|
3635
3311
|
validUntil;
|
|
3636
3312
|
};
|
|
3637
|
-
|
|
3313
|
+
_ts_decorate17([
|
|
3638
3314
|
IsArray3(),
|
|
3639
3315
|
IsString4({
|
|
3640
3316
|
each: true
|
|
@@ -3643,24 +3319,24 @@ _ts_decorate18([
|
|
|
3643
3319
|
each: true,
|
|
3644
3320
|
message: "features-Eintr\xE4ge m\xFCssen SCREAMING_SNAKE_CASE sein"
|
|
3645
3321
|
}),
|
|
3646
|
-
|
|
3322
|
+
_ts_metadata17("design:type", Array)
|
|
3647
3323
|
], CreateBundleVersionDraftDto.prototype, "features", void 0);
|
|
3648
|
-
|
|
3324
|
+
_ts_decorate17([
|
|
3649
3325
|
IsOptional3(),
|
|
3650
3326
|
IsObject3(),
|
|
3651
|
-
|
|
3327
|
+
_ts_metadata17("design:type", typeof Record === "undefined" ? Object : Record)
|
|
3652
3328
|
], CreateBundleVersionDraftDto.prototype, "quotas", void 0);
|
|
3653
|
-
|
|
3329
|
+
_ts_decorate17([
|
|
3654
3330
|
IsOptional3(),
|
|
3655
3331
|
IsObject3(),
|
|
3656
|
-
|
|
3332
|
+
_ts_metadata17("design:type", Object)
|
|
3657
3333
|
], CreateBundleVersionDraftDto.prototype, "compatibility", void 0);
|
|
3658
|
-
|
|
3334
|
+
_ts_decorate17([
|
|
3659
3335
|
IsOptional3(),
|
|
3660
3336
|
IsArray3(),
|
|
3661
|
-
|
|
3337
|
+
_ts_metadata17("design:type", typeof Array === "undefined" ? Object : Array)
|
|
3662
3338
|
], CreateBundleVersionDraftDto.prototype, "pricingOverrides", void 0);
|
|
3663
|
-
|
|
3339
|
+
_ts_decorate17([
|
|
3664
3340
|
IsOptional3(),
|
|
3665
3341
|
ValidateIf((_o, value) => value !== null),
|
|
3666
3342
|
IsNumberString({
|
|
@@ -3669,9 +3345,9 @@ _ts_decorate18([
|
|
|
3669
3345
|
Matches4(DECIMAL_PATTERN, {
|
|
3670
3346
|
message: 'monthlyNet muss Decimal mit max. 2 Nachkommastellen sein (z. B. "9.90")'
|
|
3671
3347
|
}),
|
|
3672
|
-
|
|
3348
|
+
_ts_metadata17("design:type", Object)
|
|
3673
3349
|
], CreateBundleVersionDraftDto.prototype, "monthlyNet", void 0);
|
|
3674
|
-
|
|
3350
|
+
_ts_decorate17([
|
|
3675
3351
|
IsOptional3(),
|
|
3676
3352
|
ValidateIf((_o, value) => value !== null),
|
|
3677
3353
|
IsNumberString({
|
|
@@ -3680,39 +3356,39 @@ _ts_decorate18([
|
|
|
3680
3356
|
Matches4(DECIMAL_PATTERN, {
|
|
3681
3357
|
message: "yearlyNet muss Decimal mit max. 2 Nachkommastellen sein"
|
|
3682
3358
|
}),
|
|
3683
|
-
|
|
3359
|
+
_ts_metadata17("design:type", Object)
|
|
3684
3360
|
], CreateBundleVersionDraftDto.prototype, "yearlyNet", void 0);
|
|
3685
|
-
|
|
3361
|
+
_ts_decorate17([
|
|
3686
3362
|
IsOptional3(),
|
|
3687
3363
|
IsBoolean2(),
|
|
3688
|
-
|
|
3364
|
+
_ts_metadata17("design:type", Boolean)
|
|
3689
3365
|
], CreateBundleVersionDraftDto.prototype, "marketed", void 0);
|
|
3690
|
-
|
|
3366
|
+
_ts_decorate17([
|
|
3691
3367
|
IsOptional3(),
|
|
3692
3368
|
IsString4(),
|
|
3693
3369
|
MaxLength3(2e3),
|
|
3694
|
-
|
|
3370
|
+
_ts_metadata17("design:type", String)
|
|
3695
3371
|
], CreateBundleVersionDraftDto.prototype, "changeNote", void 0);
|
|
3696
|
-
|
|
3372
|
+
_ts_decorate17([
|
|
3697
3373
|
IsOptional3(),
|
|
3698
3374
|
IsUUID(),
|
|
3699
|
-
|
|
3375
|
+
_ts_metadata17("design:type", Object)
|
|
3700
3376
|
], CreateBundleVersionDraftDto.prototype, "baseVersionId", void 0);
|
|
3701
|
-
|
|
3377
|
+
_ts_decorate17([
|
|
3702
3378
|
IsOptional3(),
|
|
3703
3379
|
ValidateIf((_o, value) => value !== null),
|
|
3704
3380
|
Matches4(ISO_DATE_PATTERN2, {
|
|
3705
3381
|
message: "validFrom muss ISO-Datum sein (YYYY-MM-DD)"
|
|
3706
3382
|
}),
|
|
3707
|
-
|
|
3383
|
+
_ts_metadata17("design:type", Object)
|
|
3708
3384
|
], CreateBundleVersionDraftDto.prototype, "validFrom", void 0);
|
|
3709
|
-
|
|
3385
|
+
_ts_decorate17([
|
|
3710
3386
|
IsOptional3(),
|
|
3711
3387
|
ValidateIf((_o, value) => value !== null),
|
|
3712
3388
|
Matches4(ISO_DATE_PATTERN2, {
|
|
3713
3389
|
message: "validUntil muss ISO-Datum sein (YYYY-MM-DD)"
|
|
3714
3390
|
}),
|
|
3715
|
-
|
|
3391
|
+
_ts_metadata17("design:type", Object)
|
|
3716
3392
|
], CreateBundleVersionDraftDto.prototype, "validUntil", void 0);
|
|
3717
3393
|
var UpdateBundleVersionDraftDto = class {
|
|
3718
3394
|
static {
|
|
@@ -3729,7 +3405,7 @@ var UpdateBundleVersionDraftDto = class {
|
|
|
3729
3405
|
validFrom;
|
|
3730
3406
|
validUntil;
|
|
3731
3407
|
};
|
|
3732
|
-
|
|
3408
|
+
_ts_decorate17([
|
|
3733
3409
|
IsOptional3(),
|
|
3734
3410
|
IsArray3(),
|
|
3735
3411
|
IsString4({
|
|
@@ -3738,61 +3414,61 @@ _ts_decorate18([
|
|
|
3738
3414
|
Matches4(FEATURE_KEY_PATTERN, {
|
|
3739
3415
|
each: true
|
|
3740
3416
|
}),
|
|
3741
|
-
|
|
3417
|
+
_ts_metadata17("design:type", Array)
|
|
3742
3418
|
], UpdateBundleVersionDraftDto.prototype, "features", void 0);
|
|
3743
|
-
|
|
3419
|
+
_ts_decorate17([
|
|
3744
3420
|
IsOptional3(),
|
|
3745
3421
|
IsObject3(),
|
|
3746
|
-
|
|
3422
|
+
_ts_metadata17("design:type", typeof Record === "undefined" ? Object : Record)
|
|
3747
3423
|
], UpdateBundleVersionDraftDto.prototype, "quotas", void 0);
|
|
3748
|
-
|
|
3424
|
+
_ts_decorate17([
|
|
3749
3425
|
IsOptional3(),
|
|
3750
3426
|
IsObject3(),
|
|
3751
|
-
|
|
3427
|
+
_ts_metadata17("design:type", Object)
|
|
3752
3428
|
], UpdateBundleVersionDraftDto.prototype, "compatibility", void 0);
|
|
3753
|
-
|
|
3429
|
+
_ts_decorate17([
|
|
3754
3430
|
IsOptional3(),
|
|
3755
3431
|
IsArray3(),
|
|
3756
|
-
|
|
3432
|
+
_ts_metadata17("design:type", typeof Array === "undefined" ? Object : Array)
|
|
3757
3433
|
], UpdateBundleVersionDraftDto.prototype, "pricingOverrides", void 0);
|
|
3758
|
-
|
|
3434
|
+
_ts_decorate17([
|
|
3759
3435
|
IsOptional3(),
|
|
3760
3436
|
ValidateIf((_o, value) => value !== null),
|
|
3761
3437
|
Matches4(DECIMAL_PATTERN),
|
|
3762
|
-
|
|
3438
|
+
_ts_metadata17("design:type", Object)
|
|
3763
3439
|
], UpdateBundleVersionDraftDto.prototype, "monthlyNet", void 0);
|
|
3764
|
-
|
|
3440
|
+
_ts_decorate17([
|
|
3765
3441
|
IsOptional3(),
|
|
3766
3442
|
ValidateIf((_o, value) => value !== null),
|
|
3767
3443
|
Matches4(DECIMAL_PATTERN),
|
|
3768
|
-
|
|
3444
|
+
_ts_metadata17("design:type", Object)
|
|
3769
3445
|
], UpdateBundleVersionDraftDto.prototype, "yearlyNet", void 0);
|
|
3770
|
-
|
|
3446
|
+
_ts_decorate17([
|
|
3771
3447
|
IsOptional3(),
|
|
3772
3448
|
IsBoolean2(),
|
|
3773
|
-
|
|
3449
|
+
_ts_metadata17("design:type", Boolean)
|
|
3774
3450
|
], UpdateBundleVersionDraftDto.prototype, "marketed", void 0);
|
|
3775
|
-
|
|
3451
|
+
_ts_decorate17([
|
|
3776
3452
|
IsOptional3(),
|
|
3777
3453
|
IsString4(),
|
|
3778
3454
|
MaxLength3(2e3),
|
|
3779
|
-
|
|
3455
|
+
_ts_metadata17("design:type", String)
|
|
3780
3456
|
], UpdateBundleVersionDraftDto.prototype, "changeNote", void 0);
|
|
3781
|
-
|
|
3457
|
+
_ts_decorate17([
|
|
3782
3458
|
IsOptional3(),
|
|
3783
3459
|
ValidateIf((_o, value) => value !== null),
|
|
3784
3460
|
Matches4(ISO_DATE_PATTERN2, {
|
|
3785
3461
|
message: "validFrom muss ISO-Datum sein (YYYY-MM-DD)"
|
|
3786
3462
|
}),
|
|
3787
|
-
|
|
3463
|
+
_ts_metadata17("design:type", Object)
|
|
3788
3464
|
], UpdateBundleVersionDraftDto.prototype, "validFrom", void 0);
|
|
3789
|
-
|
|
3465
|
+
_ts_decorate17([
|
|
3790
3466
|
IsOptional3(),
|
|
3791
3467
|
ValidateIf((_o, value) => value !== null),
|
|
3792
3468
|
Matches4(ISO_DATE_PATTERN2, {
|
|
3793
3469
|
message: "validUntil muss ISO-Datum sein (YYYY-MM-DD)"
|
|
3794
3470
|
}),
|
|
3795
|
-
|
|
3471
|
+
_ts_metadata17("design:type", Object)
|
|
3796
3472
|
], UpdateBundleVersionDraftDto.prototype, "validUntil", void 0);
|
|
3797
3473
|
var PublishBundleVersionDto = class {
|
|
3798
3474
|
static {
|
|
@@ -3813,51 +3489,51 @@ var PublishBundleVersionDto = class {
|
|
|
3813
3489
|
validFrom;
|
|
3814
3490
|
validUntil;
|
|
3815
3491
|
};
|
|
3816
|
-
|
|
3492
|
+
_ts_decorate17([
|
|
3817
3493
|
IsOptional3(),
|
|
3818
3494
|
IsBoolean2(),
|
|
3819
|
-
|
|
3495
|
+
_ts_metadata17("design:type", Boolean)
|
|
3820
3496
|
], PublishBundleVersionDto.prototype, "forceRegressive", void 0);
|
|
3821
|
-
|
|
3497
|
+
_ts_decorate17([
|
|
3822
3498
|
IsOptional3(),
|
|
3823
3499
|
IsBoolean2(),
|
|
3824
|
-
|
|
3500
|
+
_ts_metadata17("design:type", Boolean)
|
|
3825
3501
|
], PublishBundleVersionDto.prototype, "allowZeroPrice", void 0);
|
|
3826
|
-
|
|
3502
|
+
_ts_decorate17([
|
|
3827
3503
|
IsOptional3(),
|
|
3828
3504
|
ValidateIf((_o, value) => value !== null),
|
|
3829
3505
|
Matches4(ISO_DATE_PATTERN2, {
|
|
3830
3506
|
message: "validFrom muss ISO-Datum sein (YYYY-MM-DD)"
|
|
3831
3507
|
}),
|
|
3832
|
-
|
|
3508
|
+
_ts_metadata17("design:type", Object)
|
|
3833
3509
|
], PublishBundleVersionDto.prototype, "validFrom", void 0);
|
|
3834
|
-
|
|
3510
|
+
_ts_decorate17([
|
|
3835
3511
|
IsOptional3(),
|
|
3836
3512
|
ValidateIf((_o, value) => value !== null),
|
|
3837
3513
|
Matches4(ISO_DATE_PATTERN2, {
|
|
3838
3514
|
message: "validUntil muss ISO-Datum sein (YYYY-MM-DD)"
|
|
3839
3515
|
}),
|
|
3840
|
-
|
|
3516
|
+
_ts_metadata17("design:type", Object)
|
|
3841
3517
|
], PublishBundleVersionDto.prototype, "validUntil", void 0);
|
|
3842
3518
|
|
|
3843
3519
|
// src/catalog/bundles.controller.ts
|
|
3844
|
-
function
|
|
3520
|
+
function _ts_decorate18(decorators, target, key, desc) {
|
|
3845
3521
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3846
3522
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3847
3523
|
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;
|
|
3848
3524
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3849
3525
|
}
|
|
3850
|
-
__name(
|
|
3851
|
-
function
|
|
3526
|
+
__name(_ts_decorate18, "_ts_decorate");
|
|
3527
|
+
function _ts_metadata18(k, v) {
|
|
3852
3528
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3853
3529
|
}
|
|
3854
|
-
__name(
|
|
3855
|
-
function
|
|
3530
|
+
__name(_ts_metadata18, "_ts_metadata");
|
|
3531
|
+
function _ts_param14(paramIndex, decorator) {
|
|
3856
3532
|
return function(target, key) {
|
|
3857
3533
|
decorator(target, key, paramIndex);
|
|
3858
3534
|
};
|
|
3859
3535
|
}
|
|
3860
|
-
__name(
|
|
3536
|
+
__name(_ts_param14, "_ts_param");
|
|
3861
3537
|
function buildBundlesController(guards) {
|
|
3862
3538
|
let GeneratedBundlesController = class GeneratedBundlesController {
|
|
3863
3539
|
static {
|
|
@@ -3904,80 +3580,80 @@ function buildBundlesController(guards) {
|
|
|
3904
3580
|
});
|
|
3905
3581
|
}
|
|
3906
3582
|
};
|
|
3907
|
-
|
|
3583
|
+
_ts_decorate18([
|
|
3908
3584
|
Get5(),
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3585
|
+
_ts_param14(0, Query5("projectKey")),
|
|
3586
|
+
_ts_metadata18("design:type", Function),
|
|
3587
|
+
_ts_metadata18("design:paramtypes", [
|
|
3912
3588
|
String
|
|
3913
3589
|
]),
|
|
3914
|
-
|
|
3590
|
+
_ts_metadata18("design:returntype", void 0)
|
|
3915
3591
|
], GeneratedBundlesController.prototype, "listBundles", null);
|
|
3916
|
-
|
|
3592
|
+
_ts_decorate18([
|
|
3917
3593
|
Get5(":id"),
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3594
|
+
_ts_param14(0, Param3("id", new ParseUUIDPipe2())),
|
|
3595
|
+
_ts_metadata18("design:type", Function),
|
|
3596
|
+
_ts_metadata18("design:paramtypes", [
|
|
3921
3597
|
String
|
|
3922
3598
|
]),
|
|
3923
|
-
|
|
3599
|
+
_ts_metadata18("design:returntype", void 0)
|
|
3924
3600
|
], GeneratedBundlesController.prototype, "getBundle", null);
|
|
3925
|
-
|
|
3601
|
+
_ts_decorate18([
|
|
3926
3602
|
Post3(),
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3603
|
+
_ts_param14(0, Body4()),
|
|
3604
|
+
_ts_metadata18("design:type", Function),
|
|
3605
|
+
_ts_metadata18("design:paramtypes", [
|
|
3930
3606
|
typeof CreateBundleDto === "undefined" ? Object : CreateBundleDto
|
|
3931
3607
|
]),
|
|
3932
|
-
|
|
3608
|
+
_ts_metadata18("design:returntype", void 0)
|
|
3933
3609
|
], GeneratedBundlesController.prototype, "createBundle", null);
|
|
3934
|
-
|
|
3610
|
+
_ts_decorate18([
|
|
3935
3611
|
Patch3(":id"),
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3612
|
+
_ts_param14(0, Param3("id", new ParseUUIDPipe2())),
|
|
3613
|
+
_ts_param14(1, Body4()),
|
|
3614
|
+
_ts_metadata18("design:type", Function),
|
|
3615
|
+
_ts_metadata18("design:paramtypes", [
|
|
3940
3616
|
String,
|
|
3941
3617
|
typeof UpdateBundleDto === "undefined" ? Object : UpdateBundleDto
|
|
3942
3618
|
]),
|
|
3943
|
-
|
|
3619
|
+
_ts_metadata18("design:returntype", void 0)
|
|
3944
3620
|
], GeneratedBundlesController.prototype, "updateBundle", null);
|
|
3945
|
-
|
|
3621
|
+
_ts_decorate18([
|
|
3946
3622
|
Delete2(":id"),
|
|
3947
3623
|
HttpCode2(HttpStatus2.NO_CONTENT),
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3624
|
+
_ts_param14(0, Param3("id", new ParseUUIDPipe2())),
|
|
3625
|
+
_ts_metadata18("design:type", Function),
|
|
3626
|
+
_ts_metadata18("design:paramtypes", [
|
|
3951
3627
|
String
|
|
3952
3628
|
]),
|
|
3953
|
-
|
|
3629
|
+
_ts_metadata18("design:returntype", Promise)
|
|
3954
3630
|
], GeneratedBundlesController.prototype, "softDeleteBundle", null);
|
|
3955
|
-
|
|
3631
|
+
_ts_decorate18([
|
|
3956
3632
|
Get5(":id/versions"),
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3633
|
+
_ts_param14(0, Param3("id", new ParseUUIDPipe2())),
|
|
3634
|
+
_ts_metadata18("design:type", Function),
|
|
3635
|
+
_ts_metadata18("design:paramtypes", [
|
|
3960
3636
|
String
|
|
3961
3637
|
]),
|
|
3962
|
-
|
|
3638
|
+
_ts_metadata18("design:returntype", void 0)
|
|
3963
3639
|
], GeneratedBundlesController.prototype, "listVersions", null);
|
|
3964
|
-
|
|
3640
|
+
_ts_decorate18([
|
|
3965
3641
|
Post3(":id/versions"),
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3642
|
+
_ts_param14(0, Param3("id", new ParseUUIDPipe2())),
|
|
3643
|
+
_ts_param14(1, Body4()),
|
|
3644
|
+
_ts_metadata18("design:type", Function),
|
|
3645
|
+
_ts_metadata18("design:paramtypes", [
|
|
3970
3646
|
String,
|
|
3971
3647
|
typeof CreateBundleVersionDraftDto === "undefined" ? Object : CreateBundleVersionDraftDto
|
|
3972
3648
|
]),
|
|
3973
|
-
|
|
3649
|
+
_ts_metadata18("design:returntype", void 0)
|
|
3974
3650
|
], GeneratedBundlesController.prototype, "createDraft", null);
|
|
3975
|
-
GeneratedBundlesController =
|
|
3651
|
+
GeneratedBundlesController = _ts_decorate18([
|
|
3976
3652
|
Controller5("admin/catalog/bundles"),
|
|
3977
3653
|
UseGuards5(...guards),
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3654
|
+
_ts_param14(0, Inject14(BundlesService)),
|
|
3655
|
+
_ts_metadata18("design:type", Function),
|
|
3656
|
+
_ts_metadata18("design:paramtypes", [
|
|
3981
3657
|
typeof BundlesService === "undefined" ? Object : BundlesService
|
|
3982
3658
|
])
|
|
3983
3659
|
], GeneratedBundlesController);
|
|
@@ -4012,53 +3688,53 @@ function buildBundleVersionsController(guards) {
|
|
|
4012
3688
|
});
|
|
4013
3689
|
}
|
|
4014
3690
|
};
|
|
4015
|
-
|
|
3691
|
+
_ts_decorate18([
|
|
4016
3692
|
Get5(":id"),
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
3693
|
+
_ts_param14(0, Param3("id", new ParseUUIDPipe2())),
|
|
3694
|
+
_ts_metadata18("design:type", Function),
|
|
3695
|
+
_ts_metadata18("design:paramtypes", [
|
|
4020
3696
|
String
|
|
4021
3697
|
]),
|
|
4022
|
-
|
|
3698
|
+
_ts_metadata18("design:returntype", void 0)
|
|
4023
3699
|
], GeneratedBundleVersionsController.prototype, "getVersion", null);
|
|
4024
|
-
|
|
3700
|
+
_ts_decorate18([
|
|
4025
3701
|
Patch3(":id"),
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
3702
|
+
_ts_param14(0, Param3("id", new ParseUUIDPipe2())),
|
|
3703
|
+
_ts_param14(1, Body4()),
|
|
3704
|
+
_ts_metadata18("design:type", Function),
|
|
3705
|
+
_ts_metadata18("design:paramtypes", [
|
|
4030
3706
|
String,
|
|
4031
3707
|
typeof UpdateBundleVersionDraftDto === "undefined" ? Object : UpdateBundleVersionDraftDto
|
|
4032
3708
|
]),
|
|
4033
|
-
|
|
3709
|
+
_ts_metadata18("design:returntype", void 0)
|
|
4034
3710
|
], GeneratedBundleVersionsController.prototype, "updateDraft", null);
|
|
4035
|
-
|
|
3711
|
+
_ts_decorate18([
|
|
4036
3712
|
Delete2(":id"),
|
|
4037
3713
|
HttpCode2(HttpStatus2.NO_CONTENT),
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
3714
|
+
_ts_param14(0, Param3("id", new ParseUUIDPipe2())),
|
|
3715
|
+
_ts_metadata18("design:type", Function),
|
|
3716
|
+
_ts_metadata18("design:paramtypes", [
|
|
4041
3717
|
String
|
|
4042
3718
|
]),
|
|
4043
|
-
|
|
3719
|
+
_ts_metadata18("design:returntype", Promise)
|
|
4044
3720
|
], GeneratedBundleVersionsController.prototype, "discardDraft", null);
|
|
4045
|
-
|
|
3721
|
+
_ts_decorate18([
|
|
4046
3722
|
Post3(":id/publish"),
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
3723
|
+
_ts_param14(0, Param3("id", new ParseUUIDPipe2())),
|
|
3724
|
+
_ts_param14(1, Body4()),
|
|
3725
|
+
_ts_metadata18("design:type", Function),
|
|
3726
|
+
_ts_metadata18("design:paramtypes", [
|
|
4051
3727
|
String,
|
|
4052
3728
|
typeof PublishBundleVersionDto === "undefined" ? Object : PublishBundleVersionDto
|
|
4053
3729
|
]),
|
|
4054
|
-
|
|
3730
|
+
_ts_metadata18("design:returntype", void 0)
|
|
4055
3731
|
], GeneratedBundleVersionsController.prototype, "publish", null);
|
|
4056
|
-
GeneratedBundleVersionsController =
|
|
3732
|
+
GeneratedBundleVersionsController = _ts_decorate18([
|
|
4057
3733
|
Controller5("admin/catalog/bundle-versions"),
|
|
4058
3734
|
UseGuards5(...guards),
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
3735
|
+
_ts_param14(0, Inject14(BundlesService)),
|
|
3736
|
+
_ts_metadata18("design:type", Function),
|
|
3737
|
+
_ts_metadata18("design:paramtypes", [
|
|
4062
3738
|
typeof BundlesService === "undefined" ? Object : BundlesService
|
|
4063
3739
|
])
|
|
4064
3740
|
], GeneratedBundleVersionsController);
|
|
@@ -4066,617 +3742,168 @@ function buildBundleVersionsController(guards) {
|
|
|
4066
3742
|
}
|
|
4067
3743
|
__name(buildBundleVersionsController, "buildBundleVersionsController");
|
|
4068
3744
|
|
|
4069
|
-
// src/catalog/
|
|
4070
|
-
import { Body as Body5, Controller as Controller6, Delete as Delete3, Get as Get6, HttpCode as HttpCode3, HttpStatus as HttpStatus3, Inject as
|
|
3745
|
+
// src/catalog/marketing-projections.controller.ts
|
|
3746
|
+
import { Body as Body5, Controller as Controller6, Delete as Delete3, Get as Get6, HttpCode as HttpCode3, HttpStatus as HttpStatus3, Inject as Inject15, Param as Param4, ParseUUIDPipe as ParseUUIDPipe3, Patch as Patch4, Post as Post4, Query as Query6, UseGuards as UseGuards6 } from "@nestjs/common";
|
|
4071
3747
|
|
|
4072
|
-
// src/catalog/dto/
|
|
4073
|
-
import {
|
|
3748
|
+
// src/catalog/dto/marketing-projections.dto.ts
|
|
3749
|
+
import { IsArray as IsArray4, IsBoolean as IsBoolean3, IsIn as IsIn3, IsInt as IsInt3, IsOptional as IsOptional4, IsString as IsString5, IsUUID as IsUUID2, Matches as Matches5, Max as Max2, MaxLength as MaxLength4, Min as Min2, MinLength as MinLength2, ValidateNested } from "class-validator";
|
|
4074
3750
|
import { Type } from "class-transformer";
|
|
4075
|
-
function
|
|
3751
|
+
function _ts_decorate19(decorators, target, key, desc) {
|
|
4076
3752
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4077
3753
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4078
3754
|
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;
|
|
4079
3755
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4080
3756
|
}
|
|
4081
|
-
__name(
|
|
4082
|
-
function
|
|
3757
|
+
__name(_ts_decorate19, "_ts_decorate");
|
|
3758
|
+
function _ts_metadata19(k, v) {
|
|
4083
3759
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4084
3760
|
}
|
|
4085
|
-
__name(
|
|
4086
|
-
var KEY_PATTERN2 = /^[A-Z][A-Z0-9_]*$/;
|
|
3761
|
+
__name(_ts_metadata19, "_ts_metadata");
|
|
4087
3762
|
var PROJECT_KEY_PATTERN5 = /^[a-z][a-z0-9-]*$/;
|
|
4088
|
-
var
|
|
4089
|
-
var
|
|
3763
|
+
var LOCALE_PATTERN2 = /^[a-z]{2}(-[A-Z]{2})?$/;
|
|
3764
|
+
var TARGET_TYPES2 = [
|
|
3765
|
+
"PLAN",
|
|
3766
|
+
"BUNDLE"
|
|
3767
|
+
];
|
|
3768
|
+
var MarketingTopFeatureDto = class {
|
|
4090
3769
|
static {
|
|
4091
|
-
__name(this, "
|
|
3770
|
+
__name(this, "MarketingTopFeatureDto");
|
|
4092
3771
|
}
|
|
4093
|
-
|
|
4094
|
-
|
|
3772
|
+
/** Optional feature/quota key reference (auto-translation of the label). */
|
|
3773
|
+
key;
|
|
3774
|
+
/** Free text or override; empty + `key` set = auto label. */
|
|
4095
3775
|
label;
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
sortOrder;
|
|
3776
|
+
/** Optional bold addendum — may be empty. */
|
|
3777
|
+
strong;
|
|
4099
3778
|
};
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
Matches5(PROJECT_KEY_PATTERN5, {
|
|
4103
|
-
message: 'projectKey muss kebab-case sein (z. B. "my-app")'
|
|
4104
|
-
}),
|
|
4105
|
-
MaxLength4(64),
|
|
4106
|
-
_ts_metadata20("design:type", String)
|
|
4107
|
-
], CreateBusinessTypeDto.prototype, "projectKey", void 0);
|
|
4108
|
-
_ts_decorate20([
|
|
4109
|
-
IsString5(),
|
|
4110
|
-
Matches5(KEY_PATTERN2, {
|
|
4111
|
-
message: "businessTypeKey muss SCREAMING_SNAKE_CASE sein"
|
|
4112
|
-
}),
|
|
4113
|
-
MaxLength4(64),
|
|
4114
|
-
_ts_metadata20("design:type", String)
|
|
4115
|
-
], CreateBusinessTypeDto.prototype, "businessTypeKey", void 0);
|
|
4116
|
-
_ts_decorate20([
|
|
3779
|
+
_ts_decorate19([
|
|
3780
|
+
IsOptional4(),
|
|
4117
3781
|
IsString5(),
|
|
4118
|
-
MinLength2(1),
|
|
4119
3782
|
MaxLength4(120),
|
|
4120
|
-
|
|
4121
|
-
],
|
|
4122
|
-
|
|
4123
|
-
IsOptional4(),
|
|
3783
|
+
_ts_metadata19("design:type", String)
|
|
3784
|
+
], MarketingTopFeatureDto.prototype, "key", void 0);
|
|
3785
|
+
_ts_decorate19([
|
|
4124
3786
|
IsString5(),
|
|
4125
|
-
MaxLength4(
|
|
4126
|
-
|
|
4127
|
-
],
|
|
4128
|
-
|
|
4129
|
-
IsOptional4(),
|
|
3787
|
+
MaxLength4(120),
|
|
3788
|
+
_ts_metadata19("design:type", String)
|
|
3789
|
+
], MarketingTopFeatureDto.prototype, "label", void 0);
|
|
3790
|
+
_ts_decorate19([
|
|
4130
3791
|
IsString5(),
|
|
4131
|
-
MaxLength4(
|
|
4132
|
-
|
|
4133
|
-
],
|
|
4134
|
-
|
|
4135
|
-
IsOptional4(),
|
|
4136
|
-
IsInt3(),
|
|
4137
|
-
Min2(0),
|
|
4138
|
-
Max2(1e4),
|
|
4139
|
-
_ts_metadata20("design:type", Number)
|
|
4140
|
-
], CreateBusinessTypeDto.prototype, "sortOrder", void 0);
|
|
4141
|
-
var UpdateBusinessTypeDto = class {
|
|
3792
|
+
MaxLength4(80),
|
|
3793
|
+
_ts_metadata19("design:type", String)
|
|
3794
|
+
], MarketingTopFeatureDto.prototype, "strong", void 0);
|
|
3795
|
+
var CreateMarketingProjectionDto = class {
|
|
4142
3796
|
static {
|
|
4143
|
-
__name(this, "
|
|
3797
|
+
__name(this, "CreateMarketingProjectionDto");
|
|
4144
3798
|
}
|
|
4145
|
-
|
|
3799
|
+
projectKey;
|
|
3800
|
+
targetType;
|
|
3801
|
+
targetVersionId;
|
|
3802
|
+
locale;
|
|
3803
|
+
displayLabel;
|
|
4146
3804
|
description;
|
|
4147
|
-
|
|
4148
|
-
|
|
3805
|
+
visible;
|
|
3806
|
+
badge;
|
|
3807
|
+
topFeatures;
|
|
3808
|
+
trialEnabled;
|
|
3809
|
+
trialDays;
|
|
3810
|
+
priceTag;
|
|
3811
|
+
ctaLabel;
|
|
3812
|
+
priority;
|
|
3813
|
+
highlight;
|
|
4149
3814
|
};
|
|
4150
|
-
|
|
3815
|
+
_ts_decorate19([
|
|
3816
|
+
IsString5(),
|
|
3817
|
+
Matches5(PROJECT_KEY_PATTERN5, {
|
|
3818
|
+
message: "projectKey muss kebab-case sein"
|
|
3819
|
+
}),
|
|
3820
|
+
MaxLength4(64),
|
|
3821
|
+
_ts_metadata19("design:type", String)
|
|
3822
|
+
], CreateMarketingProjectionDto.prototype, "projectKey", void 0);
|
|
3823
|
+
_ts_decorate19([
|
|
3824
|
+
IsString5(),
|
|
3825
|
+
IsIn3(TARGET_TYPES2),
|
|
3826
|
+
_ts_metadata19("design:type", String)
|
|
3827
|
+
], CreateMarketingProjectionDto.prototype, "targetType", void 0);
|
|
3828
|
+
_ts_decorate19([
|
|
3829
|
+
IsUUID2(),
|
|
3830
|
+
_ts_metadata19("design:type", String)
|
|
3831
|
+
], CreateMarketingProjectionDto.prototype, "targetVersionId", void 0);
|
|
3832
|
+
_ts_decorate19([
|
|
4151
3833
|
IsOptional4(),
|
|
3834
|
+
IsString5(),
|
|
3835
|
+
Matches5(LOCALE_PATTERN2, {
|
|
3836
|
+
message: 'locale muss ISO-639-1 sein (z. B. "de", "en", "de-AT")'
|
|
3837
|
+
}),
|
|
3838
|
+
_ts_metadata19("design:type", String)
|
|
3839
|
+
], CreateMarketingProjectionDto.prototype, "locale", void 0);
|
|
3840
|
+
_ts_decorate19([
|
|
4152
3841
|
IsString5(),
|
|
4153
3842
|
MinLength2(1),
|
|
4154
3843
|
MaxLength4(120),
|
|
4155
|
-
|
|
4156
|
-
],
|
|
4157
|
-
|
|
4158
|
-
IsOptional4(),
|
|
3844
|
+
_ts_metadata19("design:type", String)
|
|
3845
|
+
], CreateMarketingProjectionDto.prototype, "displayLabel", void 0);
|
|
3846
|
+
_ts_decorate19([
|
|
4159
3847
|
IsString5(),
|
|
3848
|
+
MinLength2(1),
|
|
4160
3849
|
MaxLength4(2e3),
|
|
4161
|
-
|
|
4162
|
-
],
|
|
4163
|
-
|
|
3850
|
+
_ts_metadata19("design:type", String)
|
|
3851
|
+
], CreateMarketingProjectionDto.prototype, "description", void 0);
|
|
3852
|
+
_ts_decorate19([
|
|
3853
|
+
IsOptional4(),
|
|
3854
|
+
IsBoolean3(),
|
|
3855
|
+
_ts_metadata19("design:type", Boolean)
|
|
3856
|
+
], CreateMarketingProjectionDto.prototype, "visible", void 0);
|
|
3857
|
+
_ts_decorate19([
|
|
4164
3858
|
IsOptional4(),
|
|
4165
3859
|
IsString5(),
|
|
4166
|
-
MaxLength4(
|
|
4167
|
-
|
|
4168
|
-
],
|
|
4169
|
-
|
|
3860
|
+
MaxLength4(40),
|
|
3861
|
+
_ts_metadata19("design:type", String)
|
|
3862
|
+
], CreateMarketingProjectionDto.prototype, "badge", void 0);
|
|
3863
|
+
_ts_decorate19([
|
|
4170
3864
|
IsOptional4(),
|
|
4171
|
-
IsInt3(),
|
|
4172
|
-
Min2(0),
|
|
4173
|
-
Max2(1e4),
|
|
4174
|
-
_ts_metadata20("design:type", Number)
|
|
4175
|
-
], UpdateBusinessTypeDto.prototype, "sortOrder", void 0);
|
|
4176
|
-
var BusinessTypeBundleInputDto = class {
|
|
4177
|
-
static {
|
|
4178
|
-
__name(this, "BusinessTypeBundleInputDto");
|
|
4179
|
-
}
|
|
4180
|
-
bundleVersionId;
|
|
4181
|
-
sortOrder;
|
|
4182
|
-
};
|
|
4183
|
-
_ts_decorate20([
|
|
4184
|
-
IsUUID2(),
|
|
4185
|
-
_ts_metadata20("design:type", String)
|
|
4186
|
-
], BusinessTypeBundleInputDto.prototype, "bundleVersionId", void 0);
|
|
4187
|
-
_ts_decorate20([
|
|
4188
|
-
IsOptional4(),
|
|
4189
|
-
IsInt3(),
|
|
4190
|
-
Min2(0),
|
|
4191
|
-
Max2(1e4),
|
|
4192
|
-
_ts_metadata20("design:type", Number)
|
|
4193
|
-
], BusinessTypeBundleInputDto.prototype, "sortOrder", void 0);
|
|
4194
|
-
var CreateBusinessTypeVersionDraftDto = class {
|
|
4195
|
-
static {
|
|
4196
|
-
__name(this, "CreateBusinessTypeVersionDraftDto");
|
|
4197
|
-
}
|
|
4198
|
-
bundles;
|
|
4199
|
-
quotaOverrides;
|
|
4200
|
-
monthlyNet;
|
|
4201
|
-
yearlyNet;
|
|
4202
|
-
marketed;
|
|
4203
|
-
changeNote;
|
|
4204
|
-
baseVersionId;
|
|
4205
|
-
};
|
|
4206
|
-
_ts_decorate20([
|
|
4207
3865
|
IsArray4(),
|
|
4208
|
-
ArrayMinSize(1, {
|
|
4209
|
-
message: "mindestens ein Bundle muss referenziert werden"
|
|
4210
|
-
}),
|
|
4211
3866
|
ValidateNested({
|
|
4212
3867
|
each: true
|
|
4213
3868
|
}),
|
|
4214
|
-
Type(() =>
|
|
4215
|
-
|
|
4216
|
-
],
|
|
4217
|
-
|
|
4218
|
-
IsOptional4(),
|
|
4219
|
-
IsObject4(),
|
|
4220
|
-
_ts_metadata20("design:type", typeof Record === "undefined" ? Object : Record)
|
|
4221
|
-
], CreateBusinessTypeVersionDraftDto.prototype, "quotaOverrides", void 0);
|
|
4222
|
-
_ts_decorate20([
|
|
4223
|
-
IsOptional4(),
|
|
4224
|
-
ValidateIf2((_o, value) => value !== null),
|
|
4225
|
-
Matches5(DECIMAL_PATTERN2, {
|
|
4226
|
-
message: "monthlyNet muss Decimal mit max. 2 NK sein"
|
|
4227
|
-
}),
|
|
4228
|
-
_ts_metadata20("design:type", Object)
|
|
4229
|
-
], CreateBusinessTypeVersionDraftDto.prototype, "monthlyNet", void 0);
|
|
4230
|
-
_ts_decorate20([
|
|
4231
|
-
IsOptional4(),
|
|
4232
|
-
ValidateIf2((_o, value) => value !== null),
|
|
4233
|
-
Matches5(DECIMAL_PATTERN2),
|
|
4234
|
-
_ts_metadata20("design:type", Object)
|
|
4235
|
-
], CreateBusinessTypeVersionDraftDto.prototype, "yearlyNet", void 0);
|
|
4236
|
-
_ts_decorate20([
|
|
3869
|
+
Type(() => MarketingTopFeatureDto),
|
|
3870
|
+
_ts_metadata19("design:type", Array)
|
|
3871
|
+
], CreateMarketingProjectionDto.prototype, "topFeatures", void 0);
|
|
3872
|
+
_ts_decorate19([
|
|
4237
3873
|
IsOptional4(),
|
|
4238
3874
|
IsBoolean3(),
|
|
4239
|
-
|
|
4240
|
-
],
|
|
4241
|
-
|
|
4242
|
-
IsOptional4(),
|
|
4243
|
-
IsString5(),
|
|
4244
|
-
MaxLength4(2e3),
|
|
4245
|
-
_ts_metadata20("design:type", String)
|
|
4246
|
-
], CreateBusinessTypeVersionDraftDto.prototype, "changeNote", void 0);
|
|
4247
|
-
_ts_decorate20([
|
|
4248
|
-
IsOptional4(),
|
|
4249
|
-
IsUUID2(),
|
|
4250
|
-
_ts_metadata20("design:type", Object)
|
|
4251
|
-
], CreateBusinessTypeVersionDraftDto.prototype, "baseVersionId", void 0);
|
|
4252
|
-
var UpdateBusinessTypeVersionDraftDto = class {
|
|
4253
|
-
static {
|
|
4254
|
-
__name(this, "UpdateBusinessTypeVersionDraftDto");
|
|
4255
|
-
}
|
|
4256
|
-
bundles;
|
|
4257
|
-
quotaOverrides;
|
|
4258
|
-
monthlyNet;
|
|
4259
|
-
yearlyNet;
|
|
4260
|
-
marketed;
|
|
4261
|
-
changeNote;
|
|
4262
|
-
};
|
|
4263
|
-
_ts_decorate20([
|
|
4264
|
-
IsOptional4(),
|
|
4265
|
-
IsArray4(),
|
|
4266
|
-
ArrayMinSize(1),
|
|
4267
|
-
ValidateNested({
|
|
4268
|
-
each: true
|
|
4269
|
-
}),
|
|
4270
|
-
Type(() => BusinessTypeBundleInputDto),
|
|
4271
|
-
_ts_metadata20("design:type", Array)
|
|
4272
|
-
], UpdateBusinessTypeVersionDraftDto.prototype, "bundles", void 0);
|
|
4273
|
-
_ts_decorate20([
|
|
4274
|
-
IsOptional4(),
|
|
4275
|
-
IsObject4(),
|
|
4276
|
-
_ts_metadata20("design:type", typeof Record === "undefined" ? Object : Record)
|
|
4277
|
-
], UpdateBusinessTypeVersionDraftDto.prototype, "quotaOverrides", void 0);
|
|
4278
|
-
_ts_decorate20([
|
|
4279
|
-
IsOptional4(),
|
|
4280
|
-
ValidateIf2((_o, value) => value !== null),
|
|
4281
|
-
Matches5(DECIMAL_PATTERN2),
|
|
4282
|
-
_ts_metadata20("design:type", Object)
|
|
4283
|
-
], UpdateBusinessTypeVersionDraftDto.prototype, "monthlyNet", void 0);
|
|
4284
|
-
_ts_decorate20([
|
|
4285
|
-
IsOptional4(),
|
|
4286
|
-
ValidateIf2((_o, value) => value !== null),
|
|
4287
|
-
Matches5(DECIMAL_PATTERN2),
|
|
4288
|
-
_ts_metadata20("design:type", Object)
|
|
4289
|
-
], UpdateBusinessTypeVersionDraftDto.prototype, "yearlyNet", void 0);
|
|
4290
|
-
_ts_decorate20([
|
|
3875
|
+
_ts_metadata19("design:type", Boolean)
|
|
3876
|
+
], CreateMarketingProjectionDto.prototype, "trialEnabled", void 0);
|
|
3877
|
+
_ts_decorate19([
|
|
4291
3878
|
IsOptional4(),
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
3879
|
+
IsInt3(),
|
|
3880
|
+
Min2(1),
|
|
3881
|
+
Max2(365),
|
|
3882
|
+
_ts_metadata19("design:type", Number)
|
|
3883
|
+
], CreateMarketingProjectionDto.prototype, "trialDays", void 0);
|
|
3884
|
+
_ts_decorate19([
|
|
4296
3885
|
IsOptional4(),
|
|
4297
3886
|
IsString5(),
|
|
4298
|
-
MaxLength4(
|
|
4299
|
-
|
|
4300
|
-
], UpdateBusinessTypeVersionDraftDto.prototype, "changeNote", void 0);
|
|
4301
|
-
var PublishBusinessTypeVersionDto = class {
|
|
4302
|
-
static {
|
|
4303
|
-
__name(this, "PublishBusinessTypeVersionDto");
|
|
4304
|
-
}
|
|
4305
|
-
forceRegressive;
|
|
4306
|
-
};
|
|
4307
|
-
_ts_decorate20([
|
|
4308
|
-
IsOptional4(),
|
|
4309
|
-
IsBoolean3(),
|
|
4310
|
-
_ts_metadata20("design:type", Boolean)
|
|
4311
|
-
], PublishBusinessTypeVersionDto.prototype, "forceRegressive", void 0);
|
|
4312
|
-
|
|
4313
|
-
// src/catalog/business-types.controller.ts
|
|
4314
|
-
function _ts_decorate21(decorators, target, key, desc) {
|
|
4315
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4316
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4317
|
-
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;
|
|
4318
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4319
|
-
}
|
|
4320
|
-
__name(_ts_decorate21, "_ts_decorate");
|
|
4321
|
-
function _ts_metadata21(k, v) {
|
|
4322
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4323
|
-
}
|
|
4324
|
-
__name(_ts_metadata21, "_ts_metadata");
|
|
4325
|
-
function _ts_param16(paramIndex, decorator) {
|
|
4326
|
-
return function(target, key) {
|
|
4327
|
-
decorator(target, key, paramIndex);
|
|
4328
|
-
};
|
|
4329
|
-
}
|
|
4330
|
-
__name(_ts_param16, "_ts_param");
|
|
4331
|
-
function buildBusinessTypesController(guards) {
|
|
4332
|
-
let GeneratedBusinessTypesController = class GeneratedBusinessTypesController {
|
|
4333
|
-
static {
|
|
4334
|
-
__name(this, "GeneratedBusinessTypesController");
|
|
4335
|
-
}
|
|
4336
|
-
service;
|
|
4337
|
-
constructor(service) {
|
|
4338
|
-
this.service = service;
|
|
4339
|
-
}
|
|
4340
|
-
listBusinessTypes(projectKey) {
|
|
4341
|
-
return this.service.listBusinessTypes(projectKey);
|
|
4342
|
-
}
|
|
4343
|
-
getBusinessType(businessTypeId) {
|
|
4344
|
-
return this.service.getBusinessType(businessTypeId);
|
|
4345
|
-
}
|
|
4346
|
-
createBusinessType(dto) {
|
|
4347
|
-
return this.service.createBusinessType(dto);
|
|
4348
|
-
}
|
|
4349
|
-
updateBusinessType(businessTypeId, dto) {
|
|
4350
|
-
return this.service.updateBusinessType(businessTypeId, dto);
|
|
4351
|
-
}
|
|
4352
|
-
async softDeleteBusinessType(businessTypeId) {
|
|
4353
|
-
await this.service.softDeleteBusinessType(businessTypeId);
|
|
4354
|
-
}
|
|
4355
|
-
listVersions(businessTypeId) {
|
|
4356
|
-
return this.service.listBusinessTypeVersions(businessTypeId);
|
|
4357
|
-
}
|
|
4358
|
-
createDraft(businessTypeId, dto) {
|
|
4359
|
-
return this.service.createBusinessTypeDraft({
|
|
4360
|
-
businessTypeId,
|
|
4361
|
-
bundles: dto.bundles,
|
|
4362
|
-
quotaOverrides: dto.quotaOverrides,
|
|
4363
|
-
monthlyNet: dto.monthlyNet,
|
|
4364
|
-
yearlyNet: dto.yearlyNet,
|
|
4365
|
-
marketed: dto.marketed,
|
|
4366
|
-
changeNote: dto.changeNote,
|
|
4367
|
-
baseVersionId: dto.baseVersionId
|
|
4368
|
-
});
|
|
4369
|
-
}
|
|
4370
|
-
};
|
|
4371
|
-
_ts_decorate21([
|
|
4372
|
-
Get6(),
|
|
4373
|
-
_ts_param16(0, Query6("projectKey")),
|
|
4374
|
-
_ts_metadata21("design:type", Function),
|
|
4375
|
-
_ts_metadata21("design:paramtypes", [
|
|
4376
|
-
String
|
|
4377
|
-
]),
|
|
4378
|
-
_ts_metadata21("design:returntype", void 0)
|
|
4379
|
-
], GeneratedBusinessTypesController.prototype, "listBusinessTypes", null);
|
|
4380
|
-
_ts_decorate21([
|
|
4381
|
-
Get6(":id"),
|
|
4382
|
-
_ts_param16(0, Param4("id", new ParseUUIDPipe3())),
|
|
4383
|
-
_ts_metadata21("design:type", Function),
|
|
4384
|
-
_ts_metadata21("design:paramtypes", [
|
|
4385
|
-
String
|
|
4386
|
-
]),
|
|
4387
|
-
_ts_metadata21("design:returntype", void 0)
|
|
4388
|
-
], GeneratedBusinessTypesController.prototype, "getBusinessType", null);
|
|
4389
|
-
_ts_decorate21([
|
|
4390
|
-
Post4(),
|
|
4391
|
-
_ts_param16(0, Body5()),
|
|
4392
|
-
_ts_metadata21("design:type", Function),
|
|
4393
|
-
_ts_metadata21("design:paramtypes", [
|
|
4394
|
-
typeof CreateBusinessTypeDto === "undefined" ? Object : CreateBusinessTypeDto
|
|
4395
|
-
]),
|
|
4396
|
-
_ts_metadata21("design:returntype", void 0)
|
|
4397
|
-
], GeneratedBusinessTypesController.prototype, "createBusinessType", null);
|
|
4398
|
-
_ts_decorate21([
|
|
4399
|
-
Patch4(":id"),
|
|
4400
|
-
_ts_param16(0, Param4("id", new ParseUUIDPipe3())),
|
|
4401
|
-
_ts_param16(1, Body5()),
|
|
4402
|
-
_ts_metadata21("design:type", Function),
|
|
4403
|
-
_ts_metadata21("design:paramtypes", [
|
|
4404
|
-
String,
|
|
4405
|
-
typeof UpdateBusinessTypeDto === "undefined" ? Object : UpdateBusinessTypeDto
|
|
4406
|
-
]),
|
|
4407
|
-
_ts_metadata21("design:returntype", void 0)
|
|
4408
|
-
], GeneratedBusinessTypesController.prototype, "updateBusinessType", null);
|
|
4409
|
-
_ts_decorate21([
|
|
4410
|
-
Delete3(":id"),
|
|
4411
|
-
HttpCode3(HttpStatus3.NO_CONTENT),
|
|
4412
|
-
_ts_param16(0, Param4("id", new ParseUUIDPipe3())),
|
|
4413
|
-
_ts_metadata21("design:type", Function),
|
|
4414
|
-
_ts_metadata21("design:paramtypes", [
|
|
4415
|
-
String
|
|
4416
|
-
]),
|
|
4417
|
-
_ts_metadata21("design:returntype", Promise)
|
|
4418
|
-
], GeneratedBusinessTypesController.prototype, "softDeleteBusinessType", null);
|
|
4419
|
-
_ts_decorate21([
|
|
4420
|
-
Get6(":id/versions"),
|
|
4421
|
-
_ts_param16(0, Param4("id", new ParseUUIDPipe3())),
|
|
4422
|
-
_ts_metadata21("design:type", Function),
|
|
4423
|
-
_ts_metadata21("design:paramtypes", [
|
|
4424
|
-
String
|
|
4425
|
-
]),
|
|
4426
|
-
_ts_metadata21("design:returntype", void 0)
|
|
4427
|
-
], GeneratedBusinessTypesController.prototype, "listVersions", null);
|
|
4428
|
-
_ts_decorate21([
|
|
4429
|
-
Post4(":id/versions"),
|
|
4430
|
-
_ts_param16(0, Param4("id", new ParseUUIDPipe3())),
|
|
4431
|
-
_ts_param16(1, Body5()),
|
|
4432
|
-
_ts_metadata21("design:type", Function),
|
|
4433
|
-
_ts_metadata21("design:paramtypes", [
|
|
4434
|
-
String,
|
|
4435
|
-
typeof CreateBusinessTypeVersionDraftDto === "undefined" ? Object : CreateBusinessTypeVersionDraftDto
|
|
4436
|
-
]),
|
|
4437
|
-
_ts_metadata21("design:returntype", void 0)
|
|
4438
|
-
], GeneratedBusinessTypesController.prototype, "createDraft", null);
|
|
4439
|
-
GeneratedBusinessTypesController = _ts_decorate21([
|
|
4440
|
-
Controller6("admin/catalog/business-types"),
|
|
4441
|
-
UseGuards6(...guards),
|
|
4442
|
-
_ts_param16(0, Inject16(BusinessTypesService)),
|
|
4443
|
-
_ts_metadata21("design:type", Function),
|
|
4444
|
-
_ts_metadata21("design:paramtypes", [
|
|
4445
|
-
typeof BusinessTypesService === "undefined" ? Object : BusinessTypesService
|
|
4446
|
-
])
|
|
4447
|
-
], GeneratedBusinessTypesController);
|
|
4448
|
-
return GeneratedBusinessTypesController;
|
|
4449
|
-
}
|
|
4450
|
-
__name(buildBusinessTypesController, "buildBusinessTypesController");
|
|
4451
|
-
function buildBusinessTypeVersionsController(guards) {
|
|
4452
|
-
let GeneratedBusinessTypeVersionsController = class GeneratedBusinessTypeVersionsController {
|
|
4453
|
-
static {
|
|
4454
|
-
__name(this, "GeneratedBusinessTypeVersionsController");
|
|
4455
|
-
}
|
|
4456
|
-
service;
|
|
4457
|
-
constructor(service) {
|
|
4458
|
-
this.service = service;
|
|
4459
|
-
}
|
|
4460
|
-
getVersion(versionId) {
|
|
4461
|
-
return this.service.getBusinessTypeVersion(versionId);
|
|
4462
|
-
}
|
|
4463
|
-
updateDraft(versionId, dto) {
|
|
4464
|
-
return this.service.updateBusinessTypeDraft(versionId, dto);
|
|
4465
|
-
}
|
|
4466
|
-
publish(versionId, dto) {
|
|
4467
|
-
return this.service.publishBusinessTypeVersion(versionId, {
|
|
4468
|
-
publishedByUserId: null,
|
|
4469
|
-
forceRegressive: dto.forceRegressive
|
|
4470
|
-
});
|
|
4471
|
-
}
|
|
4472
|
-
};
|
|
4473
|
-
_ts_decorate21([
|
|
4474
|
-
Get6(":id"),
|
|
4475
|
-
_ts_param16(0, Param4("id", new ParseUUIDPipe3())),
|
|
4476
|
-
_ts_metadata21("design:type", Function),
|
|
4477
|
-
_ts_metadata21("design:paramtypes", [
|
|
4478
|
-
String
|
|
4479
|
-
]),
|
|
4480
|
-
_ts_metadata21("design:returntype", void 0)
|
|
4481
|
-
], GeneratedBusinessTypeVersionsController.prototype, "getVersion", null);
|
|
4482
|
-
_ts_decorate21([
|
|
4483
|
-
Patch4(":id"),
|
|
4484
|
-
_ts_param16(0, Param4("id", new ParseUUIDPipe3())),
|
|
4485
|
-
_ts_param16(1, Body5()),
|
|
4486
|
-
_ts_metadata21("design:type", Function),
|
|
4487
|
-
_ts_metadata21("design:paramtypes", [
|
|
4488
|
-
String,
|
|
4489
|
-
typeof UpdateBusinessTypeVersionDraftDto === "undefined" ? Object : UpdateBusinessTypeVersionDraftDto
|
|
4490
|
-
]),
|
|
4491
|
-
_ts_metadata21("design:returntype", void 0)
|
|
4492
|
-
], GeneratedBusinessTypeVersionsController.prototype, "updateDraft", null);
|
|
4493
|
-
_ts_decorate21([
|
|
4494
|
-
Post4(":id/publish"),
|
|
4495
|
-
_ts_param16(0, Param4("id", new ParseUUIDPipe3())),
|
|
4496
|
-
_ts_param16(1, Body5()),
|
|
4497
|
-
_ts_metadata21("design:type", Function),
|
|
4498
|
-
_ts_metadata21("design:paramtypes", [
|
|
4499
|
-
String,
|
|
4500
|
-
typeof PublishBusinessTypeVersionDto === "undefined" ? Object : PublishBusinessTypeVersionDto
|
|
4501
|
-
]),
|
|
4502
|
-
_ts_metadata21("design:returntype", void 0)
|
|
4503
|
-
], GeneratedBusinessTypeVersionsController.prototype, "publish", null);
|
|
4504
|
-
GeneratedBusinessTypeVersionsController = _ts_decorate21([
|
|
4505
|
-
Controller6("admin/catalog/business-type-versions"),
|
|
4506
|
-
UseGuards6(...guards),
|
|
4507
|
-
_ts_param16(0, Inject16(BusinessTypesService)),
|
|
4508
|
-
_ts_metadata21("design:type", Function),
|
|
4509
|
-
_ts_metadata21("design:paramtypes", [
|
|
4510
|
-
typeof BusinessTypesService === "undefined" ? Object : BusinessTypesService
|
|
4511
|
-
])
|
|
4512
|
-
], GeneratedBusinessTypeVersionsController);
|
|
4513
|
-
return GeneratedBusinessTypeVersionsController;
|
|
4514
|
-
}
|
|
4515
|
-
__name(buildBusinessTypeVersionsController, "buildBusinessTypeVersionsController");
|
|
4516
|
-
|
|
4517
|
-
// src/catalog/marketing-projections.controller.ts
|
|
4518
|
-
import { Body as Body6, Controller as Controller7, Delete as Delete4, Get as Get7, HttpCode as HttpCode4, HttpStatus as HttpStatus4, Inject as Inject17, Param as Param5, ParseUUIDPipe as ParseUUIDPipe4, Patch as Patch5, Post as Post5, Query as Query7, UseGuards as UseGuards7 } from "@nestjs/common";
|
|
4519
|
-
|
|
4520
|
-
// src/catalog/dto/marketing-projections.dto.ts
|
|
4521
|
-
import { IsArray as IsArray5, IsBoolean as IsBoolean4, IsIn as IsIn3, IsInt as IsInt4, IsOptional as IsOptional5, IsString as IsString6, IsUUID as IsUUID3, Matches as Matches6, Max as Max3, MaxLength as MaxLength5, Min as Min3, MinLength as MinLength3, ValidateNested as ValidateNested2 } from "class-validator";
|
|
4522
|
-
import { Type as Type2 } from "class-transformer";
|
|
4523
|
-
function _ts_decorate22(decorators, target, key, desc) {
|
|
4524
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4525
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4526
|
-
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;
|
|
4527
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4528
|
-
}
|
|
4529
|
-
__name(_ts_decorate22, "_ts_decorate");
|
|
4530
|
-
function _ts_metadata22(k, v) {
|
|
4531
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4532
|
-
}
|
|
4533
|
-
__name(_ts_metadata22, "_ts_metadata");
|
|
4534
|
-
var PROJECT_KEY_PATTERN6 = /^[a-z][a-z0-9-]*$/;
|
|
4535
|
-
var LOCALE_PATTERN2 = /^[a-z]{2}(-[A-Z]{2})?$/;
|
|
4536
|
-
var TARGET_TYPES2 = [
|
|
4537
|
-
"PLAN",
|
|
4538
|
-
"BUNDLE",
|
|
4539
|
-
"BUSINESS_TYPE"
|
|
4540
|
-
];
|
|
4541
|
-
var MarketingTopFeatureDto = class {
|
|
4542
|
-
static {
|
|
4543
|
-
__name(this, "MarketingTopFeatureDto");
|
|
4544
|
-
}
|
|
4545
|
-
/** Optional feature/quota key reference (auto-translation of the label). */
|
|
4546
|
-
key;
|
|
4547
|
-
/** Free text or override; empty + `key` set = auto label. */
|
|
4548
|
-
label;
|
|
4549
|
-
/** Optional bold addendum — may be empty. */
|
|
4550
|
-
strong;
|
|
4551
|
-
};
|
|
4552
|
-
_ts_decorate22([
|
|
4553
|
-
IsOptional5(),
|
|
4554
|
-
IsString6(),
|
|
4555
|
-
MaxLength5(120),
|
|
4556
|
-
_ts_metadata22("design:type", String)
|
|
4557
|
-
], MarketingTopFeatureDto.prototype, "key", void 0);
|
|
4558
|
-
_ts_decorate22([
|
|
4559
|
-
IsString6(),
|
|
4560
|
-
MaxLength5(120),
|
|
4561
|
-
_ts_metadata22("design:type", String)
|
|
4562
|
-
], MarketingTopFeatureDto.prototype, "label", void 0);
|
|
4563
|
-
_ts_decorate22([
|
|
4564
|
-
IsString6(),
|
|
4565
|
-
MaxLength5(80),
|
|
4566
|
-
_ts_metadata22("design:type", String)
|
|
4567
|
-
], MarketingTopFeatureDto.prototype, "strong", void 0);
|
|
4568
|
-
var CreateMarketingProjectionDto = class {
|
|
4569
|
-
static {
|
|
4570
|
-
__name(this, "CreateMarketingProjectionDto");
|
|
4571
|
-
}
|
|
4572
|
-
projectKey;
|
|
4573
|
-
targetType;
|
|
4574
|
-
targetVersionId;
|
|
4575
|
-
locale;
|
|
4576
|
-
displayLabel;
|
|
4577
|
-
description;
|
|
4578
|
-
visible;
|
|
4579
|
-
badge;
|
|
4580
|
-
topFeatures;
|
|
4581
|
-
trialEnabled;
|
|
4582
|
-
trialDays;
|
|
4583
|
-
priceTag;
|
|
4584
|
-
ctaLabel;
|
|
4585
|
-
priority;
|
|
4586
|
-
highlight;
|
|
4587
|
-
};
|
|
4588
|
-
_ts_decorate22([
|
|
4589
|
-
IsString6(),
|
|
4590
|
-
Matches6(PROJECT_KEY_PATTERN6, {
|
|
4591
|
-
message: "projectKey muss kebab-case sein"
|
|
4592
|
-
}),
|
|
4593
|
-
MaxLength5(64),
|
|
4594
|
-
_ts_metadata22("design:type", String)
|
|
4595
|
-
], CreateMarketingProjectionDto.prototype, "projectKey", void 0);
|
|
4596
|
-
_ts_decorate22([
|
|
4597
|
-
IsString6(),
|
|
4598
|
-
IsIn3(TARGET_TYPES2),
|
|
4599
|
-
_ts_metadata22("design:type", String)
|
|
4600
|
-
], CreateMarketingProjectionDto.prototype, "targetType", void 0);
|
|
4601
|
-
_ts_decorate22([
|
|
4602
|
-
IsUUID3(),
|
|
4603
|
-
_ts_metadata22("design:type", String)
|
|
4604
|
-
], CreateMarketingProjectionDto.prototype, "targetVersionId", void 0);
|
|
4605
|
-
_ts_decorate22([
|
|
4606
|
-
IsOptional5(),
|
|
4607
|
-
IsString6(),
|
|
4608
|
-
Matches6(LOCALE_PATTERN2, {
|
|
4609
|
-
message: 'locale muss ISO-639-1 sein (z. B. "de", "en", "de-AT")'
|
|
4610
|
-
}),
|
|
4611
|
-
_ts_metadata22("design:type", String)
|
|
4612
|
-
], CreateMarketingProjectionDto.prototype, "locale", void 0);
|
|
4613
|
-
_ts_decorate22([
|
|
4614
|
-
IsString6(),
|
|
4615
|
-
MinLength3(1),
|
|
4616
|
-
MaxLength5(120),
|
|
4617
|
-
_ts_metadata22("design:type", String)
|
|
4618
|
-
], CreateMarketingProjectionDto.prototype, "displayLabel", void 0);
|
|
4619
|
-
_ts_decorate22([
|
|
4620
|
-
IsString6(),
|
|
4621
|
-
MinLength3(1),
|
|
4622
|
-
MaxLength5(2e3),
|
|
4623
|
-
_ts_metadata22("design:type", String)
|
|
4624
|
-
], CreateMarketingProjectionDto.prototype, "description", void 0);
|
|
4625
|
-
_ts_decorate22([
|
|
4626
|
-
IsOptional5(),
|
|
4627
|
-
IsBoolean4(),
|
|
4628
|
-
_ts_metadata22("design:type", Boolean)
|
|
4629
|
-
], CreateMarketingProjectionDto.prototype, "visible", void 0);
|
|
4630
|
-
_ts_decorate22([
|
|
4631
|
-
IsOptional5(),
|
|
4632
|
-
IsString6(),
|
|
4633
|
-
MaxLength5(40),
|
|
4634
|
-
_ts_metadata22("design:type", String)
|
|
4635
|
-
], CreateMarketingProjectionDto.prototype, "badge", void 0);
|
|
4636
|
-
_ts_decorate22([
|
|
4637
|
-
IsOptional5(),
|
|
4638
|
-
IsArray5(),
|
|
4639
|
-
ValidateNested2({
|
|
4640
|
-
each: true
|
|
4641
|
-
}),
|
|
4642
|
-
Type2(() => MarketingTopFeatureDto),
|
|
4643
|
-
_ts_metadata22("design:type", Array)
|
|
4644
|
-
], CreateMarketingProjectionDto.prototype, "topFeatures", void 0);
|
|
4645
|
-
_ts_decorate22([
|
|
4646
|
-
IsOptional5(),
|
|
4647
|
-
IsBoolean4(),
|
|
4648
|
-
_ts_metadata22("design:type", Boolean)
|
|
4649
|
-
], CreateMarketingProjectionDto.prototype, "trialEnabled", void 0);
|
|
4650
|
-
_ts_decorate22([
|
|
4651
|
-
IsOptional5(),
|
|
4652
|
-
IsInt4(),
|
|
4653
|
-
Min3(1),
|
|
4654
|
-
Max3(365),
|
|
4655
|
-
_ts_metadata22("design:type", Number)
|
|
4656
|
-
], CreateMarketingProjectionDto.prototype, "trialDays", void 0);
|
|
4657
|
-
_ts_decorate22([
|
|
4658
|
-
IsOptional5(),
|
|
4659
|
-
IsString6(),
|
|
4660
|
-
MaxLength5(120),
|
|
4661
|
-
_ts_metadata22("design:type", Object)
|
|
3887
|
+
MaxLength4(120),
|
|
3888
|
+
_ts_metadata19("design:type", Object)
|
|
4662
3889
|
], CreateMarketingProjectionDto.prototype, "priceTag", void 0);
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
3890
|
+
_ts_decorate19([
|
|
3891
|
+
IsOptional4(),
|
|
3892
|
+
IsString5(),
|
|
3893
|
+
MaxLength4(120),
|
|
3894
|
+
_ts_metadata19("design:type", Object)
|
|
4668
3895
|
], CreateMarketingProjectionDto.prototype, "ctaLabel", void 0);
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
3896
|
+
_ts_decorate19([
|
|
3897
|
+
IsOptional4(),
|
|
3898
|
+
IsInt3(),
|
|
3899
|
+
Min2(0),
|
|
3900
|
+
Max2(1e4),
|
|
3901
|
+
_ts_metadata19("design:type", Number)
|
|
4675
3902
|
], CreateMarketingProjectionDto.prototype, "priority", void 0);
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
3903
|
+
_ts_decorate19([
|
|
3904
|
+
IsOptional4(),
|
|
3905
|
+
IsBoolean3(),
|
|
3906
|
+
_ts_metadata19("design:type", Boolean)
|
|
4680
3907
|
], CreateMarketingProjectionDto.prototype, "highlight", void 0);
|
|
4681
3908
|
var UpdateMarketingProjectionDto = class {
|
|
4682
3909
|
static {
|
|
@@ -4694,75 +3921,75 @@ var UpdateMarketingProjectionDto = class {
|
|
|
4694
3921
|
priority;
|
|
4695
3922
|
highlight;
|
|
4696
3923
|
};
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
3924
|
+
_ts_decorate19([
|
|
3925
|
+
IsOptional4(),
|
|
3926
|
+
IsString5(),
|
|
3927
|
+
MinLength2(1),
|
|
3928
|
+
MaxLength4(120),
|
|
3929
|
+
_ts_metadata19("design:type", String)
|
|
4703
3930
|
], UpdateMarketingProjectionDto.prototype, "displayLabel", void 0);
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
3931
|
+
_ts_decorate19([
|
|
3932
|
+
IsOptional4(),
|
|
3933
|
+
IsString5(),
|
|
3934
|
+
MinLength2(1),
|
|
3935
|
+
MaxLength4(2e3),
|
|
3936
|
+
_ts_metadata19("design:type", String)
|
|
4710
3937
|
], UpdateMarketingProjectionDto.prototype, "description", void 0);
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
3938
|
+
_ts_decorate19([
|
|
3939
|
+
IsOptional4(),
|
|
3940
|
+
IsBoolean3(),
|
|
3941
|
+
_ts_metadata19("design:type", Boolean)
|
|
4715
3942
|
], UpdateMarketingProjectionDto.prototype, "visible", void 0);
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
3943
|
+
_ts_decorate19([
|
|
3944
|
+
IsOptional4(),
|
|
3945
|
+
IsString5(),
|
|
3946
|
+
MaxLength4(40),
|
|
3947
|
+
_ts_metadata19("design:type", String)
|
|
4721
3948
|
], UpdateMarketingProjectionDto.prototype, "badge", void 0);
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
3949
|
+
_ts_decorate19([
|
|
3950
|
+
IsOptional4(),
|
|
3951
|
+
IsArray4(),
|
|
3952
|
+
ValidateNested({
|
|
4726
3953
|
each: true
|
|
4727
3954
|
}),
|
|
4728
|
-
|
|
4729
|
-
|
|
3955
|
+
Type(() => MarketingTopFeatureDto),
|
|
3956
|
+
_ts_metadata19("design:type", Array)
|
|
4730
3957
|
], UpdateMarketingProjectionDto.prototype, "topFeatures", void 0);
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
3958
|
+
_ts_decorate19([
|
|
3959
|
+
IsOptional4(),
|
|
3960
|
+
IsBoolean3(),
|
|
3961
|
+
_ts_metadata19("design:type", Boolean)
|
|
4735
3962
|
], UpdateMarketingProjectionDto.prototype, "trialEnabled", void 0);
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
3963
|
+
_ts_decorate19([
|
|
3964
|
+
IsOptional4(),
|
|
3965
|
+
IsInt3(),
|
|
3966
|
+
Min2(1),
|
|
3967
|
+
Max2(365),
|
|
3968
|
+
_ts_metadata19("design:type", Number)
|
|
4742
3969
|
], UpdateMarketingProjectionDto.prototype, "trialDays", void 0);
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
3970
|
+
_ts_decorate19([
|
|
3971
|
+
IsOptional4(),
|
|
3972
|
+
IsString5(),
|
|
3973
|
+
MaxLength4(120),
|
|
3974
|
+
_ts_metadata19("design:type", Object)
|
|
4748
3975
|
], UpdateMarketingProjectionDto.prototype, "priceTag", void 0);
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
3976
|
+
_ts_decorate19([
|
|
3977
|
+
IsOptional4(),
|
|
3978
|
+
IsString5(),
|
|
3979
|
+
MaxLength4(120),
|
|
3980
|
+
_ts_metadata19("design:type", Object)
|
|
4754
3981
|
], UpdateMarketingProjectionDto.prototype, "ctaLabel", void 0);
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
3982
|
+
_ts_decorate19([
|
|
3983
|
+
IsOptional4(),
|
|
3984
|
+
IsInt3(),
|
|
3985
|
+
Min2(0),
|
|
3986
|
+
Max2(1e4),
|
|
3987
|
+
_ts_metadata19("design:type", Number)
|
|
4761
3988
|
], UpdateMarketingProjectionDto.prototype, "priority", void 0);
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
3989
|
+
_ts_decorate19([
|
|
3990
|
+
IsOptional4(),
|
|
3991
|
+
IsBoolean3(),
|
|
3992
|
+
_ts_metadata19("design:type", Boolean)
|
|
4766
3993
|
], UpdateMarketingProjectionDto.prototype, "highlight", void 0);
|
|
4767
3994
|
var ListMarketingProjectionsQueryDto = class {
|
|
4768
3995
|
static {
|
|
@@ -4773,47 +4000,47 @@ var ListMarketingProjectionsQueryDto = class {
|
|
|
4773
4000
|
targetVersionId;
|
|
4774
4001
|
locale;
|
|
4775
4002
|
};
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4003
|
+
_ts_decorate19([
|
|
4004
|
+
IsString5(),
|
|
4005
|
+
Matches5(PROJECT_KEY_PATTERN5),
|
|
4006
|
+
_ts_metadata19("design:type", String)
|
|
4780
4007
|
], ListMarketingProjectionsQueryDto.prototype, "projectKey", void 0);
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4008
|
+
_ts_decorate19([
|
|
4009
|
+
IsOptional4(),
|
|
4010
|
+
IsString5(),
|
|
4784
4011
|
IsIn3(TARGET_TYPES2),
|
|
4785
|
-
|
|
4012
|
+
_ts_metadata19("design:type", String)
|
|
4786
4013
|
], ListMarketingProjectionsQueryDto.prototype, "targetType", void 0);
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4014
|
+
_ts_decorate19([
|
|
4015
|
+
IsOptional4(),
|
|
4016
|
+
IsUUID2(),
|
|
4017
|
+
_ts_metadata19("design:type", String)
|
|
4791
4018
|
], ListMarketingProjectionsQueryDto.prototype, "targetVersionId", void 0);
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4019
|
+
_ts_decorate19([
|
|
4020
|
+
IsOptional4(),
|
|
4021
|
+
IsString5(),
|
|
4022
|
+
Matches5(LOCALE_PATTERN2),
|
|
4023
|
+
_ts_metadata19("design:type", String)
|
|
4797
4024
|
], ListMarketingProjectionsQueryDto.prototype, "locale", void 0);
|
|
4798
4025
|
|
|
4799
4026
|
// src/catalog/marketing-projections.controller.ts
|
|
4800
|
-
function
|
|
4027
|
+
function _ts_decorate20(decorators, target, key, desc) {
|
|
4801
4028
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4802
4029
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4803
4030
|
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;
|
|
4804
4031
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4805
4032
|
}
|
|
4806
|
-
__name(
|
|
4807
|
-
function
|
|
4033
|
+
__name(_ts_decorate20, "_ts_decorate");
|
|
4034
|
+
function _ts_metadata20(k, v) {
|
|
4808
4035
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4809
4036
|
}
|
|
4810
|
-
__name(
|
|
4811
|
-
function
|
|
4037
|
+
__name(_ts_metadata20, "_ts_metadata");
|
|
4038
|
+
function _ts_param15(paramIndex, decorator) {
|
|
4812
4039
|
return function(target, key) {
|
|
4813
4040
|
decorator(target, key, paramIndex);
|
|
4814
4041
|
};
|
|
4815
4042
|
}
|
|
4816
|
-
__name(
|
|
4043
|
+
__name(_ts_param15, "_ts_param");
|
|
4817
4044
|
function buildMarketingProjectionsController(guards) {
|
|
4818
4045
|
let GeneratedMarketingProjectionsController = class GeneratedMarketingProjectionsController {
|
|
4819
4046
|
static {
|
|
@@ -4844,60 +4071,60 @@ function buildMarketingProjectionsController(guards) {
|
|
|
4844
4071
|
await this.service.delete(id);
|
|
4845
4072
|
}
|
|
4846
4073
|
};
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4074
|
+
_ts_decorate20([
|
|
4075
|
+
Get6(),
|
|
4076
|
+
_ts_param15(0, Query6()),
|
|
4077
|
+
_ts_metadata20("design:type", Function),
|
|
4078
|
+
_ts_metadata20("design:paramtypes", [
|
|
4852
4079
|
typeof ListMarketingProjectionsQueryDto === "undefined" ? Object : ListMarketingProjectionsQueryDto
|
|
4853
4080
|
]),
|
|
4854
|
-
|
|
4081
|
+
_ts_metadata20("design:returntype", void 0)
|
|
4855
4082
|
], GeneratedMarketingProjectionsController.prototype, "list", null);
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4083
|
+
_ts_decorate20([
|
|
4084
|
+
Get6(":id"),
|
|
4085
|
+
_ts_param15(0, Param4("id", new ParseUUIDPipe3())),
|
|
4086
|
+
_ts_metadata20("design:type", Function),
|
|
4087
|
+
_ts_metadata20("design:paramtypes", [
|
|
4861
4088
|
String
|
|
4862
4089
|
]),
|
|
4863
|
-
|
|
4090
|
+
_ts_metadata20("design:returntype", void 0)
|
|
4864
4091
|
], GeneratedMarketingProjectionsController.prototype, "getById", null);
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
typeof CreateMarketingProjectionDto === "undefined" ? Object : CreateMarketingProjectionDto
|
|
4871
|
-
]),
|
|
4872
|
-
|
|
4873
|
-
], GeneratedMarketingProjectionsController.prototype, "create", null);
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4092
|
+
_ts_decorate20([
|
|
4093
|
+
Post4(),
|
|
4094
|
+
_ts_param15(0, Body5()),
|
|
4095
|
+
_ts_metadata20("design:type", Function),
|
|
4096
|
+
_ts_metadata20("design:paramtypes", [
|
|
4097
|
+
typeof CreateMarketingProjectionDto === "undefined" ? Object : CreateMarketingProjectionDto
|
|
4098
|
+
]),
|
|
4099
|
+
_ts_metadata20("design:returntype", void 0)
|
|
4100
|
+
], GeneratedMarketingProjectionsController.prototype, "create", null);
|
|
4101
|
+
_ts_decorate20([
|
|
4102
|
+
Patch4(":id"),
|
|
4103
|
+
_ts_param15(0, Param4("id", new ParseUUIDPipe3())),
|
|
4104
|
+
_ts_param15(1, Body5()),
|
|
4105
|
+
_ts_metadata20("design:type", Function),
|
|
4106
|
+
_ts_metadata20("design:paramtypes", [
|
|
4880
4107
|
String,
|
|
4881
4108
|
typeof UpdateMarketingProjectionDto === "undefined" ? Object : UpdateMarketingProjectionDto
|
|
4882
4109
|
]),
|
|
4883
|
-
|
|
4110
|
+
_ts_metadata20("design:returntype", void 0)
|
|
4884
4111
|
], GeneratedMarketingProjectionsController.prototype, "update", null);
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4112
|
+
_ts_decorate20([
|
|
4113
|
+
Delete3(":id"),
|
|
4114
|
+
HttpCode3(HttpStatus3.NO_CONTENT),
|
|
4115
|
+
_ts_param15(0, Param4("id", new ParseUUIDPipe3())),
|
|
4116
|
+
_ts_metadata20("design:type", Function),
|
|
4117
|
+
_ts_metadata20("design:paramtypes", [
|
|
4891
4118
|
String
|
|
4892
4119
|
]),
|
|
4893
|
-
|
|
4120
|
+
_ts_metadata20("design:returntype", Promise)
|
|
4894
4121
|
], GeneratedMarketingProjectionsController.prototype, "delete", null);
|
|
4895
|
-
GeneratedMarketingProjectionsController =
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4122
|
+
GeneratedMarketingProjectionsController = _ts_decorate20([
|
|
4123
|
+
Controller6("admin/catalog/marketing-projections"),
|
|
4124
|
+
UseGuards6(...guards),
|
|
4125
|
+
_ts_param15(0, Inject15(MarketingProjectionsService)),
|
|
4126
|
+
_ts_metadata20("design:type", Function),
|
|
4127
|
+
_ts_metadata20("design:paramtypes", [
|
|
4901
4128
|
typeof MarketingProjectionsService === "undefined" ? Object : MarketingProjectionsService
|
|
4902
4129
|
])
|
|
4903
4130
|
], GeneratedMarketingProjectionsController);
|
|
@@ -4906,23 +4133,23 @@ function buildMarketingProjectionsController(guards) {
|
|
|
4906
4133
|
__name(buildMarketingProjectionsController, "buildMarketingProjectionsController");
|
|
4907
4134
|
|
|
4908
4135
|
// src/catalog/plans.controller.ts
|
|
4909
|
-
import { Body as
|
|
4136
|
+
import { Body as Body6, Controller as Controller7, Delete as Delete4, Get as Get7, HttpCode as HttpCode4, HttpStatus as HttpStatus4, Inject as Inject16, Optional as Optional8, Param as Param5, ParseUUIDPipe as ParseUUIDPipe4, Patch as Patch5, Post as Post5, Query as Query7, UseGuards as UseGuards7 } from "@nestjs/common";
|
|
4910
4137
|
|
|
4911
4138
|
// src/catalog/dto/plans.dto.ts
|
|
4912
|
-
import { IsInt as
|
|
4913
|
-
function
|
|
4139
|
+
import { IsInt as IsInt4, IsOptional as IsOptional5, IsString as IsString6, Matches as Matches6, Max as Max3, MaxLength as MaxLength5, Min as Min3, MinLength as MinLength3 } from "class-validator";
|
|
4140
|
+
function _ts_decorate21(decorators, target, key, desc) {
|
|
4914
4141
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4915
4142
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4916
4143
|
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;
|
|
4917
4144
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4918
4145
|
}
|
|
4919
|
-
__name(
|
|
4920
|
-
function
|
|
4146
|
+
__name(_ts_decorate21, "_ts_decorate");
|
|
4147
|
+
function _ts_metadata21(k, v) {
|
|
4921
4148
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4922
4149
|
}
|
|
4923
|
-
__name(
|
|
4924
|
-
var
|
|
4925
|
-
var
|
|
4150
|
+
__name(_ts_metadata21, "_ts_metadata");
|
|
4151
|
+
var KEY_PATTERN2 = /^[A-Z][A-Z0-9_]*$/;
|
|
4152
|
+
var PROJECT_KEY_PATTERN6 = /^[a-z][a-z0-9-]*$/;
|
|
4926
4153
|
var CreatePlanDto = class {
|
|
4927
4154
|
static {
|
|
4928
4155
|
__name(this, "CreatePlanDto");
|
|
@@ -4934,46 +4161,46 @@ var CreatePlanDto = class {
|
|
|
4934
4161
|
icon;
|
|
4935
4162
|
sortOrder;
|
|
4936
4163
|
};
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4164
|
+
_ts_decorate21([
|
|
4165
|
+
IsString6(),
|
|
4166
|
+
Matches6(PROJECT_KEY_PATTERN6, {
|
|
4940
4167
|
message: 'projectKey muss kebab-case sein (z. B. "my-app")'
|
|
4941
4168
|
}),
|
|
4942
|
-
|
|
4943
|
-
|
|
4169
|
+
MaxLength5(64),
|
|
4170
|
+
_ts_metadata21("design:type", String)
|
|
4944
4171
|
], CreatePlanDto.prototype, "projectKey", void 0);
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4172
|
+
_ts_decorate21([
|
|
4173
|
+
IsString6(),
|
|
4174
|
+
Matches6(KEY_PATTERN2, {
|
|
4948
4175
|
message: 'planKey muss SCREAMING_SNAKE_CASE sein (z. B. "STARTER")'
|
|
4949
4176
|
}),
|
|
4950
|
-
|
|
4951
|
-
|
|
4177
|
+
MaxLength5(64),
|
|
4178
|
+
_ts_metadata21("design:type", String)
|
|
4952
4179
|
], CreatePlanDto.prototype, "planKey", void 0);
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4180
|
+
_ts_decorate21([
|
|
4181
|
+
IsString6(),
|
|
4182
|
+
MinLength3(1),
|
|
4183
|
+
MaxLength5(120),
|
|
4184
|
+
_ts_metadata21("design:type", String)
|
|
4958
4185
|
], CreatePlanDto.prototype, "label", void 0);
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4186
|
+
_ts_decorate21([
|
|
4187
|
+
IsOptional5(),
|
|
4188
|
+
IsString6(),
|
|
4189
|
+
MaxLength5(2e3),
|
|
4190
|
+
_ts_metadata21("design:type", String)
|
|
4964
4191
|
], CreatePlanDto.prototype, "description", void 0);
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4192
|
+
_ts_decorate21([
|
|
4193
|
+
IsOptional5(),
|
|
4194
|
+
IsString6(),
|
|
4195
|
+
MaxLength5(64),
|
|
4196
|
+
_ts_metadata21("design:type", String)
|
|
4970
4197
|
], CreatePlanDto.prototype, "icon", void 0);
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4198
|
+
_ts_decorate21([
|
|
4199
|
+
IsOptional5(),
|
|
4200
|
+
IsInt4(),
|
|
4201
|
+
Min3(0),
|
|
4202
|
+
Max3(1e4),
|
|
4203
|
+
_ts_metadata21("design:type", Number)
|
|
4977
4204
|
], CreatePlanDto.prototype, "sortOrder", void 0);
|
|
4978
4205
|
var UpdatePlanDto = class {
|
|
4979
4206
|
static {
|
|
@@ -4984,48 +4211,48 @@ var UpdatePlanDto = class {
|
|
|
4984
4211
|
icon;
|
|
4985
4212
|
sortOrder;
|
|
4986
4213
|
};
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4214
|
+
_ts_decorate21([
|
|
4215
|
+
IsOptional5(),
|
|
4216
|
+
IsString6(),
|
|
4217
|
+
MinLength3(1),
|
|
4218
|
+
MaxLength5(120),
|
|
4219
|
+
_ts_metadata21("design:type", String)
|
|
4993
4220
|
], UpdatePlanDto.prototype, "label", void 0);
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4221
|
+
_ts_decorate21([
|
|
4222
|
+
IsOptional5(),
|
|
4223
|
+
IsString6(),
|
|
4224
|
+
MaxLength5(2e3),
|
|
4225
|
+
_ts_metadata21("design:type", Object)
|
|
4999
4226
|
], UpdatePlanDto.prototype, "description", void 0);
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
4227
|
+
_ts_decorate21([
|
|
4228
|
+
IsOptional5(),
|
|
4229
|
+
IsString6(),
|
|
4230
|
+
MaxLength5(64),
|
|
4231
|
+
_ts_metadata21("design:type", Object)
|
|
5005
4232
|
], UpdatePlanDto.prototype, "icon", void 0);
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
4233
|
+
_ts_decorate21([
|
|
4234
|
+
IsOptional5(),
|
|
4235
|
+
IsInt4(),
|
|
4236
|
+
Min3(0),
|
|
4237
|
+
Max3(1e4),
|
|
4238
|
+
_ts_metadata21("design:type", Number)
|
|
5012
4239
|
], UpdatePlanDto.prototype, "sortOrder", void 0);
|
|
5013
4240
|
|
|
5014
4241
|
// src/catalog/dto/plan-versions.dto.ts
|
|
5015
|
-
import { IsArray as
|
|
5016
|
-
function
|
|
4242
|
+
import { IsArray as IsArray5, IsBoolean as IsBoolean4, IsISO8601, IsObject as IsObject4, IsOptional as IsOptional6, IsString as IsString7, IsUUID as IsUUID3, Matches as Matches7, MaxLength as MaxLength6, ValidateIf as ValidateIf2 } from "class-validator";
|
|
4243
|
+
function _ts_decorate22(decorators, target, key, desc) {
|
|
5017
4244
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5018
4245
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5019
4246
|
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;
|
|
5020
4247
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5021
4248
|
}
|
|
5022
|
-
__name(
|
|
5023
|
-
function
|
|
4249
|
+
__name(_ts_decorate22, "_ts_decorate");
|
|
4250
|
+
function _ts_metadata22(k, v) {
|
|
5024
4251
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
5025
4252
|
}
|
|
5026
|
-
__name(
|
|
4253
|
+
__name(_ts_metadata22, "_ts_metadata");
|
|
5027
4254
|
var FEATURE_KEY_PATTERN2 = /^[A-Z][A-Z0-9_]*$/;
|
|
5028
|
-
var
|
|
4255
|
+
var DECIMAL_PATTERN2 = /^\d+(\.\d{1,2})?$/;
|
|
5029
4256
|
var CreatePlanVersionDraftDto = class {
|
|
5030
4257
|
static {
|
|
5031
4258
|
__name(this, "CreatePlanVersionDraftDto");
|
|
@@ -5047,73 +4274,73 @@ var CreatePlanVersionDraftDto = class {
|
|
|
5047
4274
|
/** Optional; null = unlimited. ISO date string. */
|
|
5048
4275
|
validUntil;
|
|
5049
4276
|
};
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
4277
|
+
_ts_decorate22([
|
|
4278
|
+
IsArray5(),
|
|
4279
|
+
IsString7({
|
|
5053
4280
|
each: true
|
|
5054
4281
|
}),
|
|
5055
|
-
|
|
4282
|
+
Matches7(FEATURE_KEY_PATTERN2, {
|
|
5056
4283
|
each: true,
|
|
5057
4284
|
message: "features-Eintr\xE4ge m\xFCssen SCREAMING_SNAKE_CASE sein"
|
|
5058
4285
|
}),
|
|
5059
|
-
|
|
4286
|
+
_ts_metadata22("design:type", Array)
|
|
5060
4287
|
], CreatePlanVersionDraftDto.prototype, "features", void 0);
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
4288
|
+
_ts_decorate22([
|
|
4289
|
+
IsOptional6(),
|
|
4290
|
+
IsArray5(),
|
|
4291
|
+
IsString7({
|
|
5065
4292
|
each: true
|
|
5066
4293
|
}),
|
|
5067
|
-
|
|
4294
|
+
Matches7(FEATURE_KEY_PATTERN2, {
|
|
5068
4295
|
each: true,
|
|
5069
4296
|
message: "bundles-Eintr\xE4ge m\xFCssen SCREAMING_SNAKE_CASE sein"
|
|
5070
4297
|
}),
|
|
5071
|
-
|
|
4298
|
+
_ts_metadata22("design:type", Array)
|
|
5072
4299
|
], CreatePlanVersionDraftDto.prototype, "bundles", void 0);
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
4300
|
+
_ts_decorate22([
|
|
4301
|
+
IsObject4(),
|
|
4302
|
+
_ts_metadata22("design:type", typeof Record === "undefined" ? Object : Record)
|
|
5076
4303
|
], CreatePlanVersionDraftDto.prototype, "quotas", void 0);
|
|
5077
|
-
|
|
5078
|
-
|
|
4304
|
+
_ts_decorate22([
|
|
4305
|
+
Matches7(DECIMAL_PATTERN2, {
|
|
5079
4306
|
message: 'monthlyNet muss Decimal mit max. 2 Nachkommastellen sein (z. B. "9.90")'
|
|
5080
4307
|
}),
|
|
5081
|
-
|
|
4308
|
+
_ts_metadata22("design:type", String)
|
|
5082
4309
|
], CreatePlanVersionDraftDto.prototype, "monthlyNet", void 0);
|
|
5083
|
-
|
|
5084
|
-
|
|
4310
|
+
_ts_decorate22([
|
|
4311
|
+
Matches7(DECIMAL_PATTERN2, {
|
|
5085
4312
|
message: "yearlyNet muss Decimal mit max. 2 Nachkommastellen sein"
|
|
5086
4313
|
}),
|
|
5087
|
-
|
|
4314
|
+
_ts_metadata22("design:type", String)
|
|
5088
4315
|
], CreatePlanVersionDraftDto.prototype, "yearlyNet", void 0);
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
4316
|
+
_ts_decorate22([
|
|
4317
|
+
IsOptional6(),
|
|
4318
|
+
IsBoolean4(),
|
|
4319
|
+
_ts_metadata22("design:type", Boolean)
|
|
5093
4320
|
], CreatePlanVersionDraftDto.prototype, "marketed", void 0);
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
4321
|
+
_ts_decorate22([
|
|
4322
|
+
IsOptional6(),
|
|
4323
|
+
IsString7(),
|
|
4324
|
+
MaxLength6(2e3),
|
|
4325
|
+
_ts_metadata22("design:type", String)
|
|
5099
4326
|
], CreatePlanVersionDraftDto.prototype, "changeNote", void 0);
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
4327
|
+
_ts_decorate22([
|
|
4328
|
+
IsOptional6(),
|
|
4329
|
+
ValidateIf2((_o, value) => value !== null),
|
|
4330
|
+
IsUUID3(),
|
|
4331
|
+
_ts_metadata22("design:type", Object)
|
|
5105
4332
|
], CreatePlanVersionDraftDto.prototype, "baseVersionId", void 0);
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
4333
|
+
_ts_decorate22([
|
|
4334
|
+
IsOptional6(),
|
|
4335
|
+
ValidateIf2((_o, value) => value !== null),
|
|
5109
4336
|
IsISO8601(),
|
|
5110
|
-
|
|
4337
|
+
_ts_metadata22("design:type", Object)
|
|
5111
4338
|
], CreatePlanVersionDraftDto.prototype, "validFrom", void 0);
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
4339
|
+
_ts_decorate22([
|
|
4340
|
+
IsOptional6(),
|
|
4341
|
+
ValidateIf2((_o, value) => value !== null),
|
|
5115
4342
|
IsISO8601(),
|
|
5116
|
-
|
|
4343
|
+
_ts_metadata22("design:type", Object)
|
|
5117
4344
|
], CreatePlanVersionDraftDto.prototype, "validUntil", void 0);
|
|
5118
4345
|
var UpdatePlanVersionDraftDto = class {
|
|
5119
4346
|
static {
|
|
@@ -5130,65 +4357,65 @@ var UpdatePlanVersionDraftDto = class {
|
|
|
5130
4357
|
validFrom;
|
|
5131
4358
|
validUntil;
|
|
5132
4359
|
};
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
4360
|
+
_ts_decorate22([
|
|
4361
|
+
IsOptional6(),
|
|
4362
|
+
IsArray5(),
|
|
4363
|
+
IsString7({
|
|
5137
4364
|
each: true
|
|
5138
4365
|
}),
|
|
5139
|
-
|
|
4366
|
+
Matches7(FEATURE_KEY_PATTERN2, {
|
|
5140
4367
|
each: true
|
|
5141
4368
|
}),
|
|
5142
|
-
|
|
4369
|
+
_ts_metadata22("design:type", Array)
|
|
5143
4370
|
], UpdatePlanVersionDraftDto.prototype, "features", void 0);
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
4371
|
+
_ts_decorate22([
|
|
4372
|
+
IsOptional6(),
|
|
4373
|
+
IsArray5(),
|
|
4374
|
+
IsString7({
|
|
5148
4375
|
each: true
|
|
5149
4376
|
}),
|
|
5150
|
-
|
|
4377
|
+
Matches7(FEATURE_KEY_PATTERN2, {
|
|
5151
4378
|
each: true
|
|
5152
4379
|
}),
|
|
5153
|
-
|
|
4380
|
+
_ts_metadata22("design:type", Array)
|
|
5154
4381
|
], UpdatePlanVersionDraftDto.prototype, "bundles", void 0);
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
4382
|
+
_ts_decorate22([
|
|
4383
|
+
IsOptional6(),
|
|
4384
|
+
IsObject4(),
|
|
4385
|
+
_ts_metadata22("design:type", typeof Record === "undefined" ? Object : Record)
|
|
5159
4386
|
], UpdatePlanVersionDraftDto.prototype, "quotas", void 0);
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
4387
|
+
_ts_decorate22([
|
|
4388
|
+
IsOptional6(),
|
|
4389
|
+
Matches7(DECIMAL_PATTERN2),
|
|
4390
|
+
_ts_metadata22("design:type", String)
|
|
5164
4391
|
], UpdatePlanVersionDraftDto.prototype, "monthlyNet", void 0);
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
4392
|
+
_ts_decorate22([
|
|
4393
|
+
IsOptional6(),
|
|
4394
|
+
Matches7(DECIMAL_PATTERN2),
|
|
4395
|
+
_ts_metadata22("design:type", String)
|
|
5169
4396
|
], UpdatePlanVersionDraftDto.prototype, "yearlyNet", void 0);
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
4397
|
+
_ts_decorate22([
|
|
4398
|
+
IsOptional6(),
|
|
4399
|
+
IsBoolean4(),
|
|
4400
|
+
_ts_metadata22("design:type", Boolean)
|
|
5174
4401
|
], UpdatePlanVersionDraftDto.prototype, "marketed", void 0);
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
4402
|
+
_ts_decorate22([
|
|
4403
|
+
IsOptional6(),
|
|
4404
|
+
IsString7(),
|
|
4405
|
+
MaxLength6(2e3),
|
|
4406
|
+
_ts_metadata22("design:type", String)
|
|
5180
4407
|
], UpdatePlanVersionDraftDto.prototype, "changeNote", void 0);
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
4408
|
+
_ts_decorate22([
|
|
4409
|
+
IsOptional6(),
|
|
4410
|
+
ValidateIf2((_o, value) => value !== null),
|
|
5184
4411
|
IsISO8601(),
|
|
5185
|
-
|
|
4412
|
+
_ts_metadata22("design:type", Object)
|
|
5186
4413
|
], UpdatePlanVersionDraftDto.prototype, "validFrom", void 0);
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
4414
|
+
_ts_decorate22([
|
|
4415
|
+
IsOptional6(),
|
|
4416
|
+
ValidateIf2((_o, value) => value !== null),
|
|
5190
4417
|
IsISO8601(),
|
|
5191
|
-
|
|
4418
|
+
_ts_metadata22("design:type", Object)
|
|
5192
4419
|
], UpdatePlanVersionDraftDto.prototype, "validUntil", void 0);
|
|
5193
4420
|
var TerminatePlanVersionDto = class {
|
|
5194
4421
|
static {
|
|
@@ -5200,9 +4427,9 @@ var TerminatePlanVersionDto = class {
|
|
|
5200
4427
|
*/
|
|
5201
4428
|
endsAt;
|
|
5202
4429
|
};
|
|
5203
|
-
|
|
4430
|
+
_ts_decorate22([
|
|
5204
4431
|
IsISO8601(),
|
|
5205
|
-
|
|
4432
|
+
_ts_metadata22("design:type", String)
|
|
5206
4433
|
], TerminatePlanVersionDto.prototype, "endsAt", void 0);
|
|
5207
4434
|
var PublishPlanVersionDto = class {
|
|
5208
4435
|
static {
|
|
@@ -5222,47 +4449,47 @@ var PublishPlanVersionDto = class {
|
|
|
5222
4449
|
validFrom;
|
|
5223
4450
|
validUntil;
|
|
5224
4451
|
};
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
4452
|
+
_ts_decorate22([
|
|
4453
|
+
IsOptional6(),
|
|
4454
|
+
IsBoolean4(),
|
|
4455
|
+
_ts_metadata22("design:type", Boolean)
|
|
5229
4456
|
], PublishPlanVersionDto.prototype, "forceRegressive", void 0);
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
4457
|
+
_ts_decorate22([
|
|
4458
|
+
IsOptional6(),
|
|
4459
|
+
IsBoolean4(),
|
|
4460
|
+
_ts_metadata22("design:type", Boolean)
|
|
5234
4461
|
], PublishPlanVersionDto.prototype, "allowZeroPrice", void 0);
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
4462
|
+
_ts_decorate22([
|
|
4463
|
+
IsOptional6(),
|
|
4464
|
+
ValidateIf2((_o, value) => value !== null),
|
|
5238
4465
|
IsISO8601(),
|
|
5239
|
-
|
|
4466
|
+
_ts_metadata22("design:type", Object)
|
|
5240
4467
|
], PublishPlanVersionDto.prototype, "validFrom", void 0);
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
4468
|
+
_ts_decorate22([
|
|
4469
|
+
IsOptional6(),
|
|
4470
|
+
ValidateIf2((_o, value) => value !== null),
|
|
5244
4471
|
IsISO8601(),
|
|
5245
|
-
|
|
4472
|
+
_ts_metadata22("design:type", Object)
|
|
5246
4473
|
], PublishPlanVersionDto.prototype, "validUntil", void 0);
|
|
5247
4474
|
|
|
5248
4475
|
// src/catalog/plans.controller.ts
|
|
5249
|
-
function
|
|
4476
|
+
function _ts_decorate23(decorators, target, key, desc) {
|
|
5250
4477
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5251
4478
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5252
4479
|
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;
|
|
5253
4480
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5254
4481
|
}
|
|
5255
|
-
__name(
|
|
5256
|
-
function
|
|
4482
|
+
__name(_ts_decorate23, "_ts_decorate");
|
|
4483
|
+
function _ts_metadata23(k, v) {
|
|
5257
4484
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
5258
4485
|
}
|
|
5259
|
-
__name(
|
|
5260
|
-
function
|
|
4486
|
+
__name(_ts_metadata23, "_ts_metadata");
|
|
4487
|
+
function _ts_param16(paramIndex, decorator) {
|
|
5261
4488
|
return function(target, key) {
|
|
5262
4489
|
decorator(target, key, paramIndex);
|
|
5263
4490
|
};
|
|
5264
4491
|
}
|
|
5265
|
-
__name(
|
|
4492
|
+
__name(_ts_param16, "_ts_param");
|
|
5266
4493
|
function buildPlansController(guards) {
|
|
5267
4494
|
let GeneratedPlansController = class GeneratedPlansController {
|
|
5268
4495
|
static {
|
|
@@ -5330,103 +4557,103 @@ function buildPlansController(guards) {
|
|
|
5330
4557
|
}
|
|
5331
4558
|
}
|
|
5332
4559
|
};
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
4560
|
+
_ts_decorate23([
|
|
4561
|
+
Get7(),
|
|
4562
|
+
_ts_param16(0, Query7("projectKey")),
|
|
4563
|
+
_ts_param16(1, Query7("onlyPublished")),
|
|
4564
|
+
_ts_metadata23("design:type", Function),
|
|
4565
|
+
_ts_metadata23("design:paramtypes", [
|
|
5339
4566
|
String,
|
|
5340
4567
|
String
|
|
5341
4568
|
]),
|
|
5342
|
-
|
|
4569
|
+
_ts_metadata23("design:returntype", void 0)
|
|
5343
4570
|
], GeneratedPlansController.prototype, "listPlans", null);
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
4571
|
+
_ts_decorate23([
|
|
4572
|
+
Get7("tenant-counts"),
|
|
4573
|
+
_ts_param16(0, Query7("projectKey")),
|
|
4574
|
+
_ts_metadata23("design:type", Function),
|
|
4575
|
+
_ts_metadata23("design:paramtypes", [
|
|
5349
4576
|
String
|
|
5350
4577
|
]),
|
|
5351
|
-
|
|
4578
|
+
_ts_metadata23("design:returntype", void 0)
|
|
5352
4579
|
], GeneratedPlansController.prototype, "getTenantCounts", null);
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
4580
|
+
_ts_decorate23([
|
|
4581
|
+
Get7(":id"),
|
|
4582
|
+
_ts_param16(0, Param5("id", new ParseUUIDPipe4())),
|
|
4583
|
+
_ts_metadata23("design:type", Function),
|
|
4584
|
+
_ts_metadata23("design:paramtypes", [
|
|
5358
4585
|
String
|
|
5359
4586
|
]),
|
|
5360
|
-
|
|
4587
|
+
_ts_metadata23("design:returntype", void 0)
|
|
5361
4588
|
], GeneratedPlansController.prototype, "getPlan", null);
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
4589
|
+
_ts_decorate23([
|
|
4590
|
+
Post5(),
|
|
4591
|
+
_ts_param16(0, Body6()),
|
|
4592
|
+
_ts_metadata23("design:type", Function),
|
|
4593
|
+
_ts_metadata23("design:paramtypes", [
|
|
5367
4594
|
typeof CreatePlanDto === "undefined" ? Object : CreatePlanDto
|
|
5368
4595
|
]),
|
|
5369
|
-
|
|
4596
|
+
_ts_metadata23("design:returntype", void 0)
|
|
5370
4597
|
], GeneratedPlansController.prototype, "createPlan", null);
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
4598
|
+
_ts_decorate23([
|
|
4599
|
+
Patch5(":id"),
|
|
4600
|
+
_ts_param16(0, Param5("id", new ParseUUIDPipe4())),
|
|
4601
|
+
_ts_param16(1, Body6()),
|
|
4602
|
+
_ts_metadata23("design:type", Function),
|
|
4603
|
+
_ts_metadata23("design:paramtypes", [
|
|
5377
4604
|
String,
|
|
5378
4605
|
typeof UpdatePlanDto === "undefined" ? Object : UpdatePlanDto
|
|
5379
4606
|
]),
|
|
5380
|
-
|
|
4607
|
+
_ts_metadata23("design:returntype", void 0)
|
|
5381
4608
|
], GeneratedPlansController.prototype, "updatePlan", null);
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
4609
|
+
_ts_decorate23([
|
|
4610
|
+
Delete4(":id"),
|
|
4611
|
+
HttpCode4(HttpStatus4.NO_CONTENT),
|
|
4612
|
+
_ts_param16(0, Param5("id", new ParseUUIDPipe4())),
|
|
4613
|
+
_ts_metadata23("design:type", Function),
|
|
4614
|
+
_ts_metadata23("design:paramtypes", [
|
|
5388
4615
|
String
|
|
5389
4616
|
]),
|
|
5390
|
-
|
|
4617
|
+
_ts_metadata23("design:returntype", Promise)
|
|
5391
4618
|
], GeneratedPlansController.prototype, "softDeletePlan", null);
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
4619
|
+
_ts_decorate23([
|
|
4620
|
+
Delete4(":id/purge"),
|
|
4621
|
+
HttpCode4(HttpStatus4.NO_CONTENT),
|
|
4622
|
+
_ts_param16(0, Param5("id", new ParseUUIDPipe4())),
|
|
4623
|
+
_ts_metadata23("design:type", Function),
|
|
4624
|
+
_ts_metadata23("design:paramtypes", [
|
|
5398
4625
|
String
|
|
5399
4626
|
]),
|
|
5400
|
-
|
|
4627
|
+
_ts_metadata23("design:returntype", Promise)
|
|
5401
4628
|
], GeneratedPlansController.prototype, "hardDeletePlan", null);
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
4629
|
+
_ts_decorate23([
|
|
4630
|
+
Get7(":id/versions"),
|
|
4631
|
+
_ts_param16(0, Param5("id", new ParseUUIDPipe4())),
|
|
4632
|
+
_ts_metadata23("design:type", Function),
|
|
4633
|
+
_ts_metadata23("design:paramtypes", [
|
|
5407
4634
|
String
|
|
5408
4635
|
]),
|
|
5409
|
-
|
|
4636
|
+
_ts_metadata23("design:returntype", void 0)
|
|
5410
4637
|
], GeneratedPlansController.prototype, "listVersions", null);
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
4638
|
+
_ts_decorate23([
|
|
4639
|
+
Post5(":id/versions"),
|
|
4640
|
+
_ts_param16(0, Param5("id", new ParseUUIDPipe4())),
|
|
4641
|
+
_ts_param16(1, Body6()),
|
|
4642
|
+
_ts_metadata23("design:type", Function),
|
|
4643
|
+
_ts_metadata23("design:paramtypes", [
|
|
5417
4644
|
String,
|
|
5418
4645
|
typeof CreatePlanVersionDraftDto === "undefined" ? Object : CreatePlanVersionDraftDto
|
|
5419
4646
|
]),
|
|
5420
|
-
|
|
4647
|
+
_ts_metadata23("design:returntype", void 0)
|
|
5421
4648
|
], GeneratedPlansController.prototype, "createDraft", null);
|
|
5422
|
-
GeneratedPlansController =
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
4649
|
+
GeneratedPlansController = _ts_decorate23([
|
|
4650
|
+
Controller7("admin/catalog/plans"),
|
|
4651
|
+
UseGuards7(...guards),
|
|
4652
|
+
_ts_param16(0, Inject16(PlansService)),
|
|
4653
|
+
_ts_param16(1, Optional8()),
|
|
4654
|
+
_ts_param16(1, Inject16(PlanVersionsService)),
|
|
4655
|
+
_ts_metadata23("design:type", Function),
|
|
4656
|
+
_ts_metadata23("design:paramtypes", [
|
|
5430
4657
|
typeof PlansService === "undefined" ? Object : PlansService,
|
|
5431
4658
|
Object
|
|
5432
4659
|
])
|
|
@@ -5465,64 +4692,64 @@ function buildPlanVersionsController(guards) {
|
|
|
5465
4692
|
return this.service.terminatePlanVersion(versionId, new Date(dto.endsAt));
|
|
5466
4693
|
}
|
|
5467
4694
|
};
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
4695
|
+
_ts_decorate23([
|
|
4696
|
+
Get7(":id"),
|
|
4697
|
+
_ts_param16(0, Param5("id", new ParseUUIDPipe4())),
|
|
4698
|
+
_ts_metadata23("design:type", Function),
|
|
4699
|
+
_ts_metadata23("design:paramtypes", [
|
|
5473
4700
|
String
|
|
5474
4701
|
]),
|
|
5475
|
-
|
|
4702
|
+
_ts_metadata23("design:returntype", void 0)
|
|
5476
4703
|
], GeneratedPlanVersionsController.prototype, "getVersion", null);
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
4704
|
+
_ts_decorate23([
|
|
4705
|
+
Patch5(":id"),
|
|
4706
|
+
_ts_param16(0, Param5("id", new ParseUUIDPipe4())),
|
|
4707
|
+
_ts_param16(1, Body6()),
|
|
4708
|
+
_ts_metadata23("design:type", Function),
|
|
4709
|
+
_ts_metadata23("design:paramtypes", [
|
|
5483
4710
|
String,
|
|
5484
4711
|
typeof UpdatePlanVersionDraftDto === "undefined" ? Object : UpdatePlanVersionDraftDto
|
|
5485
4712
|
]),
|
|
5486
|
-
|
|
4713
|
+
_ts_metadata23("design:returntype", void 0)
|
|
5487
4714
|
], GeneratedPlanVersionsController.prototype, "updateDraft", null);
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
4715
|
+
_ts_decorate23([
|
|
4716
|
+
Post5(":id/publish"),
|
|
4717
|
+
_ts_param16(0, Param5("id", new ParseUUIDPipe4())),
|
|
4718
|
+
_ts_param16(1, Body6()),
|
|
4719
|
+
_ts_metadata23("design:type", Function),
|
|
4720
|
+
_ts_metadata23("design:paramtypes", [
|
|
5494
4721
|
String,
|
|
5495
4722
|
typeof PublishPlanVersionDto === "undefined" ? Object : PublishPlanVersionDto
|
|
5496
4723
|
]),
|
|
5497
|
-
|
|
4724
|
+
_ts_metadata23("design:returntype", void 0)
|
|
5498
4725
|
], GeneratedPlanVersionsController.prototype, "publish", null);
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
4726
|
+
_ts_decorate23([
|
|
4727
|
+
Delete4(":id"),
|
|
4728
|
+
HttpCode4(HttpStatus4.NO_CONTENT),
|
|
4729
|
+
_ts_param16(0, Param5("id", new ParseUUIDPipe4())),
|
|
4730
|
+
_ts_metadata23("design:type", Function),
|
|
4731
|
+
_ts_metadata23("design:paramtypes", [
|
|
5505
4732
|
String
|
|
5506
4733
|
]),
|
|
5507
|
-
|
|
4734
|
+
_ts_metadata23("design:returntype", Promise)
|
|
5508
4735
|
], GeneratedPlanVersionsController.prototype, "discardDraft", null);
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
4736
|
+
_ts_decorate23([
|
|
4737
|
+
Post5(":id/terminate"),
|
|
4738
|
+
_ts_param16(0, Param5("id", new ParseUUIDPipe4())),
|
|
4739
|
+
_ts_param16(1, Body6()),
|
|
4740
|
+
_ts_metadata23("design:type", Function),
|
|
4741
|
+
_ts_metadata23("design:paramtypes", [
|
|
5515
4742
|
String,
|
|
5516
4743
|
typeof TerminatePlanVersionDto === "undefined" ? Object : TerminatePlanVersionDto
|
|
5517
4744
|
]),
|
|
5518
|
-
|
|
4745
|
+
_ts_metadata23("design:returntype", void 0)
|
|
5519
4746
|
], GeneratedPlanVersionsController.prototype, "terminate", null);
|
|
5520
|
-
GeneratedPlanVersionsController =
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
4747
|
+
GeneratedPlanVersionsController = _ts_decorate23([
|
|
4748
|
+
Controller7("admin/catalog/plan-versions"),
|
|
4749
|
+
UseGuards7(...guards),
|
|
4750
|
+
_ts_param16(0, Inject16(PlanVersionsService)),
|
|
4751
|
+
_ts_metadata23("design:type", Function),
|
|
4752
|
+
_ts_metadata23("design:paramtypes", [
|
|
5526
4753
|
typeof PlanVersionsService === "undefined" ? Object : PlanVersionsService
|
|
5527
4754
|
])
|
|
5528
4755
|
], GeneratedPlanVersionsController);
|
|
@@ -5532,19 +4759,18 @@ __name(buildPlanVersionsController, "buildPlanVersionsController");
|
|
|
5532
4759
|
|
|
5533
4760
|
// src/catalog/catalog.module.ts
|
|
5534
4761
|
import { Module } from "@nestjs/common";
|
|
5535
|
-
function
|
|
4762
|
+
function _ts_decorate24(decorators, target, key, desc) {
|
|
5536
4763
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5537
4764
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5538
4765
|
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;
|
|
5539
4766
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5540
4767
|
}
|
|
5541
|
-
__name(
|
|
4768
|
+
__name(_ts_decorate24, "_ts_decorate");
|
|
5542
4769
|
var CatalogModule = class _CatalogModule {
|
|
5543
4770
|
static {
|
|
5544
4771
|
__name(this, "CatalogModule");
|
|
5545
4772
|
}
|
|
5546
4773
|
static forRoot(options) {
|
|
5547
|
-
const hasBusinessType = options.businessTypeRepository !== void 0;
|
|
5548
4774
|
const hasMarketing = options.marketingProjectionRepository !== void 0;
|
|
5549
4775
|
const hasPlan = options.planRepository !== void 0;
|
|
5550
4776
|
const hasCatalogEntry = options.catalogEntryRepository !== void 0;
|
|
@@ -5555,10 +4781,6 @@ var CatalogModule = class _CatalogModule {
|
|
|
5555
4781
|
if (options.controller) {
|
|
5556
4782
|
controllers.push(buildBundlesController(options.controller.guards));
|
|
5557
4783
|
controllers.push(buildBundleVersionsController(options.controller.guards));
|
|
5558
|
-
if (hasBusinessType) {
|
|
5559
|
-
controllers.push(buildBusinessTypesController(options.controller.guards));
|
|
5560
|
-
controllers.push(buildBusinessTypeVersionsController(options.controller.guards));
|
|
5561
|
-
}
|
|
5562
4784
|
if (hasMarketing) {
|
|
5563
4785
|
controllers.push(buildMarketingProjectionsController(options.controller.guards));
|
|
5564
4786
|
}
|
|
@@ -5603,10 +4825,6 @@ var CatalogModule = class _CatalogModule {
|
|
|
5603
4825
|
BundlesService,
|
|
5604
4826
|
BUNDLE_REPOSITORY_TOKEN
|
|
5605
4827
|
];
|
|
5606
|
-
if (hasBusinessType && options.businessTypeRepository) {
|
|
5607
|
-
providers.push(asProvider(BUSINESS_TYPE_REPOSITORY_TOKEN, options.businessTypeRepository), BusinessTypesService);
|
|
5608
|
-
exports.push(BusinessTypesService, BUSINESS_TYPE_REPOSITORY_TOKEN);
|
|
5609
|
-
}
|
|
5610
4828
|
if (hasMarketing && options.marketingProjectionRepository) {
|
|
5611
4829
|
providers.push(asProvider(MARKETING_PROJECTION_REPOSITORY_TOKEN, options.marketingProjectionRepository), MarketingProjectionsService);
|
|
5612
4830
|
exports.push(MarketingProjectionsService, MARKETING_PROJECTION_REPOSITORY_TOKEN);
|
|
@@ -5641,7 +4859,7 @@ var CatalogModule = class _CatalogModule {
|
|
|
5641
4859
|
};
|
|
5642
4860
|
}
|
|
5643
4861
|
};
|
|
5644
|
-
CatalogModule =
|
|
4862
|
+
CatalogModule = _ts_decorate24([
|
|
5645
4863
|
Module({})
|
|
5646
4864
|
], CatalogModule);
|
|
5647
4865
|
|
|
@@ -5679,26 +4897,6 @@ function runPreflight(input) {
|
|
|
5679
4897
|
});
|
|
5680
4898
|
}
|
|
5681
4899
|
}
|
|
5682
|
-
const bundleVersionById = new Map(input.bundleVersions.map((bv) => [
|
|
5683
|
-
bv.id,
|
|
5684
|
-
bv
|
|
5685
|
-
]));
|
|
5686
|
-
for (const btv of input.businessTypeVersions) {
|
|
5687
|
-
const referencedBundles = btv.bundles.map((b) => bundleVersionById.get(b.bundleVersionId)).filter((b) => b !== void 0);
|
|
5688
|
-
const warns = validateBusinessTypeDraft({
|
|
5689
|
-
businessTypeKey: btv.businessTypeKey,
|
|
5690
|
-
quotaOverrides: btv.quotaOverrides ?? {}
|
|
5691
|
-
}, referencedBundles, input.snapshot, approved);
|
|
5692
|
-
for (const w of warns) {
|
|
5693
|
-
findings.push({
|
|
5694
|
-
kind: "business-type",
|
|
5695
|
-
versionId: btv.id,
|
|
5696
|
-
entityKey: btv.businessTypeKey,
|
|
5697
|
-
version: btv.version,
|
|
5698
|
-
warning: w
|
|
5699
|
-
});
|
|
5700
|
-
}
|
|
5701
|
-
}
|
|
5702
4900
|
findings.sort((a, b) => {
|
|
5703
4901
|
if (a.kind !== b.kind) return a.kind.localeCompare(b.kind);
|
|
5704
4902
|
if (a.entityKey !== b.entityKey) return a.entityKey.localeCompare(b.entityKey);
|
|
@@ -5708,7 +4906,6 @@ function runPreflight(input) {
|
|
|
5708
4906
|
const counts = {
|
|
5709
4907
|
planFindings: findings.filter((f) => f.kind === "plan").length,
|
|
5710
4908
|
bundleFindings: findings.filter((f) => f.kind === "bundle").length,
|
|
5711
|
-
businessTypeFindings: findings.filter((f) => f.kind === "business-type").length,
|
|
5712
4909
|
total: findings.length
|
|
5713
4910
|
};
|
|
5714
4911
|
const hasBlockingFinding = findings.some((f) => !ADVISORY_STRICT_MODE_CODES.has(f.warning.code));
|
|
@@ -5721,7 +4918,7 @@ function runPreflight(input) {
|
|
|
5721
4918
|
__name(runPreflight, "runPreflight");
|
|
5722
4919
|
function formatPreflightReport(report) {
|
|
5723
4920
|
const lines = [];
|
|
5724
|
-
lines.push(`Preflight (Status: ${report.overall.toUpperCase()})`, ` Plans: ${report.counts.planFindings} \xB7 Bundles: ${report.counts.bundleFindings} \xB7
|
|
4921
|
+
lines.push(`Preflight (Status: ${report.overall.toUpperCase()})`, ` Plans: ${report.counts.planFindings} \xB7 Bundles: ${report.counts.bundleFindings} \xB7 Gesamt: ${report.counts.total}`, "");
|
|
5725
4922
|
if (report.findings.length === 0) {
|
|
5726
4923
|
lines.push(" \u2713 Keine Strict-Mode-Verst\xF6\xDFe gefunden.");
|
|
5727
4924
|
return lines.join("\n");
|
|
@@ -5860,10 +5057,8 @@ export {
|
|
|
5860
5057
|
ADVISORY_STRICT_MODE_CODES,
|
|
5861
5058
|
blockingStrictModeWarnings,
|
|
5862
5059
|
validateBundleDraft,
|
|
5863
|
-
validateBusinessTypeDraft,
|
|
5864
5060
|
validatePlanDraft,
|
|
5865
5061
|
BundlesService,
|
|
5866
|
-
BusinessTypesService,
|
|
5867
5062
|
MarketingProjectionsService,
|
|
5868
5063
|
featureApprovalSignature,
|
|
5869
5064
|
quotaApprovalSignature,
|
|
@@ -5893,14 +5088,6 @@ export {
|
|
|
5893
5088
|
PublishBundleVersionDto,
|
|
5894
5089
|
buildBundlesController,
|
|
5895
5090
|
buildBundleVersionsController,
|
|
5896
|
-
CreateBusinessTypeDto,
|
|
5897
|
-
UpdateBusinessTypeDto,
|
|
5898
|
-
BusinessTypeBundleInputDto,
|
|
5899
|
-
CreateBusinessTypeVersionDraftDto,
|
|
5900
|
-
UpdateBusinessTypeVersionDraftDto,
|
|
5901
|
-
PublishBusinessTypeVersionDto,
|
|
5902
|
-
buildBusinessTypesController,
|
|
5903
|
-
buildBusinessTypeVersionsController,
|
|
5904
5091
|
CreateMarketingProjectionDto,
|
|
5905
5092
|
UpdateMarketingProjectionDto,
|
|
5906
5093
|
ListMarketingProjectionsQueryDto,
|