@happyvertical/smrt-content 0.56.1 → 0.56.2
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/chunks/{content-corrections-DBYUJDaD.js → content-corrections-BYT3Qdw5.js} +51 -16
- package/dist/chunks/content-corrections-BYT3Qdw5.js.map +1 -0
- package/dist/chunks/{content-query-GKyj_m0n.js → content-query-Cad5-JBU.js} +5 -5
- package/dist/chunks/content-query-Cad5-JBU.js.map +1 -0
- package/dist/chunks/{content-versions-DGXxL4VF.js → content-versions-Dk8AHf7r.js} +2 -2
- package/dist/chunks/{content-versions-DGXxL4VF.js.map → content-versions-Dk8AHf7r.js.map} +1 -1
- package/dist/chunks/{contents-BfOgYyph.js → contents-xluc3iyj.js} +2 -2
- package/dist/chunks/{contents-BfOgYyph.js.map → contents-xluc3iyj.js.map} +1 -1
- package/dist/content-contribution-attachments.d.ts.map +1 -1
- package/dist/content-contributors.d.ts.map +1 -1
- package/dist/content-corrections.d.ts.map +1 -1
- package/dist/index.js +145 -69
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +220 -12
- package/dist/server.js +1 -1
- package/dist/smrt-knowledge.json +116 -571
- package/package.json +16 -16
- package/dist/chunks/content-corrections-DBYUJDaD.js.map +0 -1
- package/dist/chunks/content-query-GKyj_m0n.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunks/rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { $ as parseContentReviewResponse, A as normalizeContentTransparency, B as getAcceptedContentReviewStatuses, C as resolveContentTenantReadScope, F as smrtContentReviewPrompt, G as getContentReviewProfile, H as getContentReviewKind, I as smrtContentThumbnailAIGeneratePrompt, J as getEffectiveContentGovernanceConfig, K as getContentReviewProfileKeys, L as buildContentGovernanceAssignmentKey, M as ContentReference, N as promptMessageOptions, O as getQueryRows, P as smrtContentApplyCorrectionPrompt, R as buildContentReviewPrompt, S as mergeContentQueryScope, T as ThumbnailGenerator, U as getContentReviewPolicies, V as getContentGovernanceConfig, W as getContentReviewPolicy, X as hasStaticContentGovernancePolicy, Y as getFallbackPolicyKind, Z as hasStaticContentGovernanceProfile, _ as assertContentQuerySchema, a as CONTENT_QUERY_IDENTITY_FIELD, at as isAssetAssociable, b as clearContentQuerySchemaCache, c as CONTENT_QUERY_MIN_RESULT_BYTES, d as DATA_QUERY_MAX_JSON_DEPTH, et as resetContentGovernanceConfig, f as DATA_QUERY_MAX_JSON_STRING_LENGTH, g as MAX_CONTENT_QUERY_OR_BRANCHES, h as DATA_QUERY_MAX_WARNING_LENGTH, i as CONTENT_QUERY_EXCLUDED_FIELD_IDS, it as ContentAsset, j as ContentReferences, k as isMissingTableError, l as DATA_QUERY_FORBIDDEN_JSON_KEYS, m as DATA_QUERY_MAX_WARNINGS, n as CONTENT_QUERY_DEFAULT_PAGE_LIMIT, nt as resolveEffectiveContentGovernance, o as CONTENT_QUERY_MAX_PAGE_LIMIT, ot as isMetadataAccessor, p as DATA_QUERY_MAX_STRING_LENGTH, q as getContentReviewRequirements, r as CONTENT_QUERY_DEFAULT_SORT, rt as ContentAssetCollection, s as CONTENT_QUERY_MAX_RESULT_BYTES, t as CONTENT_QUERY_CLASS_NAME, tt as resolveConfiguredContentGovernance, u as DATA_QUERY_MAX_JSON_CONTAINER_ITEMS, v as buildContentQuerySchema, w as Content, x as executeContentQuery, y as buildDataQuerySchemaForClass, z as configureContentGovernance } from "./chunks/content-query-
|
|
2
|
+
import { $ as parseContentReviewResponse, A as normalizeContentTransparency, B as getAcceptedContentReviewStatuses, C as resolveContentTenantReadScope, F as smrtContentReviewPrompt, G as getContentReviewProfile, H as getContentReviewKind, I as smrtContentThumbnailAIGeneratePrompt, J as getEffectiveContentGovernanceConfig, K as getContentReviewProfileKeys, L as buildContentGovernanceAssignmentKey, M as ContentReference, N as promptMessageOptions, O as getQueryRows, P as smrtContentApplyCorrectionPrompt, R as buildContentReviewPrompt, S as mergeContentQueryScope, T as ThumbnailGenerator, U as getContentReviewPolicies, V as getContentGovernanceConfig, W as getContentReviewPolicy, X as hasStaticContentGovernancePolicy, Y as getFallbackPolicyKind, Z as hasStaticContentGovernanceProfile, _ as assertContentQuerySchema, a as CONTENT_QUERY_IDENTITY_FIELD, at as isAssetAssociable, b as clearContentQuerySchemaCache, c as CONTENT_QUERY_MIN_RESULT_BYTES, d as DATA_QUERY_MAX_JSON_DEPTH, et as resetContentGovernanceConfig, f as DATA_QUERY_MAX_JSON_STRING_LENGTH, g as MAX_CONTENT_QUERY_OR_BRANCHES, h as DATA_QUERY_MAX_WARNING_LENGTH, i as CONTENT_QUERY_EXCLUDED_FIELD_IDS, it as ContentAsset, j as ContentReferences, k as isMissingTableError, l as DATA_QUERY_FORBIDDEN_JSON_KEYS, m as DATA_QUERY_MAX_WARNINGS, n as CONTENT_QUERY_DEFAULT_PAGE_LIMIT, nt as resolveEffectiveContentGovernance, o as CONTENT_QUERY_MAX_PAGE_LIMIT, ot as isMetadataAccessor, p as DATA_QUERY_MAX_STRING_LENGTH, q as getContentReviewRequirements, r as CONTENT_QUERY_DEFAULT_SORT, rt as ContentAssetCollection, s as CONTENT_QUERY_MAX_RESULT_BYTES, t as CONTENT_QUERY_CLASS_NAME, tt as resolveConfiguredContentGovernance, u as DATA_QUERY_MAX_JSON_CONTAINER_ITEMS, v as buildContentQuerySchema, w as Content, x as executeContentQuery, y as buildDataQuerySchemaForClass, z as configureContentGovernance } from "./chunks/content-query-Cad5-JBU.js";
|
|
3
3
|
import { BODY_MAIN_IMAGE_ATTRIBUTE, BODY_THUMBNAIL_ATTRIBUTE, DEFAULT_CONTENT_BODY_FORMAT, THUMBNAIL_WIDE_ASPECT_RATIO, bodyHasImage, bodyHasThumbnail, bodyToEditorHtml, editorHtmlToBody, extractBodyImages, htmlToMarkdown, placeThumbnailInBody, removeThumbnailFromBody, renderContentBodyHtml, renderMarkdownToHtml, resolveBodyFormat, resolveBodyMainPicture, sanitizeHtml, setBodyMainImage, stripHtml, thumbnailPlacementForSize } from "./body-format.js";
|
|
4
|
-
import { r as ContentCorrection, t as ContentCorrectionCollection } from "./chunks/content-corrections-
|
|
4
|
+
import { r as ContentCorrection, t as ContentCorrectionCollection } from "./chunks/content-corrections-BYT3Qdw5.js";
|
|
5
5
|
import { contentEditorAssistantContextToChatProps, createContentEditorAssistantContext, sanitizeContentEditorAssistantFieldUpdates } from "./content-editor-assistant.js";
|
|
6
|
-
import { i as fetchSafeRemoteUrlInternal, r as fetchSafeRemoteUrl, t as Contents } from "./chunks/contents-
|
|
6
|
+
import { i as fetchSafeRemoteUrlInternal, r as fetchSafeRemoteUrl, t as Contents } from "./chunks/contents-xluc3iyj.js";
|
|
7
7
|
import { r as ContentReview, t as ContentReviewCollection } from "./chunks/content-reviews-B6h2aJ9m.js";
|
|
8
|
-
import { r as ContentVersion, t as ContentVersionCollection } from "./chunks/content-versions-
|
|
8
|
+
import { r as ContentVersion, t as ContentVersionCollection } from "./chunks/content-versions-Dk8AHf7r.js";
|
|
9
9
|
import { evaluateContentPublishReadiness } from "./publish-readiness.js";
|
|
10
10
|
import { ObjectRegistry, SmrtCollection, SmrtObject, crossPackageRef, field, foreignKey, smrt } from "@happyvertical/smrt-core";
|
|
11
11
|
import { AssetCollection, AssetStatusCollection, AssetTypeCollection } from "@happyvertical/smrt-assets";
|
|
@@ -778,21 +778,21 @@ function evaluateContributionIntake(options) {
|
|
|
778
778
|
}
|
|
779
779
|
//#endregion
|
|
780
780
|
//#region src/content-contribution.ts
|
|
781
|
-
var __defProp$
|
|
782
|
-
var __getOwnPropDesc$
|
|
783
|
-
var __defNormalProp$
|
|
781
|
+
var __defProp$12 = Object.defineProperty;
|
|
782
|
+
var __getOwnPropDesc$12 = Object.getOwnPropertyDescriptor;
|
|
783
|
+
var __defNormalProp$12 = (obj, key, value) => key in obj ? __defProp$12(obj, key, {
|
|
784
784
|
enumerable: true,
|
|
785
785
|
configurable: true,
|
|
786
786
|
writable: true,
|
|
787
787
|
value
|
|
788
788
|
}) : obj[key] = value;
|
|
789
|
-
var __decorateClass$
|
|
790
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
789
|
+
var __decorateClass$12 = (decorators, target, key, kind) => {
|
|
790
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$12(target, key) : target;
|
|
791
791
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
792
|
-
if (kind && result) __defProp$
|
|
792
|
+
if (kind && result) __defProp$12(target, key, result);
|
|
793
793
|
return result;
|
|
794
794
|
};
|
|
795
|
-
var __publicField$
|
|
795
|
+
var __publicField$12 = (obj, key, value) => __defNormalProp$12(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
796
796
|
function parseMetadata$4(raw) {
|
|
797
797
|
if (!raw) return {};
|
|
798
798
|
if (typeof raw === "object") return { ...raw };
|
|
@@ -895,7 +895,7 @@ var ContentContribution = class extends SmrtObject {
|
|
|
895
895
|
return ContentContributorCollection.create(this.options);
|
|
896
896
|
}
|
|
897
897
|
async getContentsCollection() {
|
|
898
|
-
const { Contents } = await import("./chunks/contents-
|
|
898
|
+
const { Contents } = await import("./chunks/contents-xluc3iyj.js").then((n) => n.n);
|
|
899
899
|
return Contents.create({ db: this.db });
|
|
900
900
|
}
|
|
901
901
|
async getAssetCollection() {
|
|
@@ -1160,16 +1160,16 @@ var ContentContribution = class extends SmrtObject {
|
|
|
1160
1160
|
};
|
|
1161
1161
|
}
|
|
1162
1162
|
};
|
|
1163
|
-
__publicField$
|
|
1164
|
-
__decorateClass$
|
|
1165
|
-
__decorateClass$
|
|
1166
|
-
__decorateClass$
|
|
1167
|
-
__decorateClass$
|
|
1163
|
+
__publicField$12(ContentContribution, "__smrtPackage__", "@happyvertical/smrt-content");
|
|
1164
|
+
__decorateClass$12([foreignKey("ContentContributor", { required: true })], ContentContribution.prototype, "contributorId", 2);
|
|
1165
|
+
__decorateClass$12([field({ required: true })], ContentContribution.prototype, "contributionTypeKey", 2);
|
|
1166
|
+
__decorateClass$12([crossPackageRef("@happyvertical/smrt-messages:Message")], ContentContribution.prototype, "sourceMessageId", 2);
|
|
1167
|
+
__decorateClass$12([foreignKey("Content", {
|
|
1168
1168
|
nullable: true,
|
|
1169
1169
|
onDelete: "SET NULL"
|
|
1170
1170
|
})], ContentContribution.prototype, "promotedContentId", 2);
|
|
1171
|
-
__decorateClass$
|
|
1172
|
-
ContentContribution = __decorateClass$
|
|
1171
|
+
__decorateClass$12([tenantId({ nullable: true })], ContentContribution.prototype, "tenantId", 2);
|
|
1172
|
+
ContentContribution = __decorateClass$12([TenantScoped({ mode: "optional" }), smrt({
|
|
1173
1173
|
tableName: "content_contributions",
|
|
1174
1174
|
conflictColumns: ["id"],
|
|
1175
1175
|
api: {
|
|
@@ -1223,21 +1223,21 @@ ContentContribution = __decorateClass$10([TenantScoped({ mode: "optional" }), sm
|
|
|
1223
1223
|
})], ContentContribution);
|
|
1224
1224
|
//#endregion
|
|
1225
1225
|
//#region src/content-contribution-attachment.ts
|
|
1226
|
-
var __defProp$
|
|
1227
|
-
var __getOwnPropDesc$
|
|
1228
|
-
var __defNormalProp$
|
|
1226
|
+
var __defProp$11 = Object.defineProperty;
|
|
1227
|
+
var __getOwnPropDesc$11 = Object.getOwnPropertyDescriptor;
|
|
1228
|
+
var __defNormalProp$11 = (obj, key, value) => key in obj ? __defProp$11(obj, key, {
|
|
1229
1229
|
enumerable: true,
|
|
1230
1230
|
configurable: true,
|
|
1231
1231
|
writable: true,
|
|
1232
1232
|
value
|
|
1233
1233
|
}) : obj[key] = value;
|
|
1234
|
-
var __decorateClass$
|
|
1235
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
1234
|
+
var __decorateClass$11 = (decorators, target, key, kind) => {
|
|
1235
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$11(target, key) : target;
|
|
1236
1236
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1237
|
-
if (kind && result) __defProp$
|
|
1237
|
+
if (kind && result) __defProp$11(target, key, result);
|
|
1238
1238
|
return result;
|
|
1239
1239
|
};
|
|
1240
|
-
var __publicField$
|
|
1240
|
+
var __publicField$11 = (obj, key, value) => __defNormalProp$11(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1241
1241
|
function parseMetadata$3(raw) {
|
|
1242
1242
|
if (!raw) return {};
|
|
1243
1243
|
if (typeof raw === "object") return { ...raw };
|
|
@@ -1293,12 +1293,12 @@ var ContentContributionAttachment = class extends SmrtObject {
|
|
|
1293
1293
|
};
|
|
1294
1294
|
}
|
|
1295
1295
|
};
|
|
1296
|
-
__publicField$
|
|
1297
|
-
__decorateClass$
|
|
1298
|
-
__decorateClass$
|
|
1299
|
-
__decorateClass$
|
|
1300
|
-
__decorateClass$
|
|
1301
|
-
ContentContributionAttachment = __decorateClass$
|
|
1296
|
+
__publicField$11(ContentContributionAttachment, "__smrtPackage__", "@happyvertical/smrt-content");
|
|
1297
|
+
__decorateClass$11([foreignKey("ContentContribution", { required: true })], ContentContributionAttachment.prototype, "contributionId", 2);
|
|
1298
|
+
__decorateClass$11([foreignKey("ContentContributionRevision")], ContentContributionAttachment.prototype, "revisionId", 2);
|
|
1299
|
+
__decorateClass$11([crossPackageRef("@happyvertical/smrt-assets:Asset")], ContentContributionAttachment.prototype, "promotedAssetId", 2);
|
|
1300
|
+
__decorateClass$11([tenantId({ nullable: true })], ContentContributionAttachment.prototype, "tenantId", 2);
|
|
1301
|
+
ContentContributionAttachment = __decorateClass$11([TenantScoped({ mode: "optional" }), smrt({
|
|
1302
1302
|
tableName: "content_contribution_attachments",
|
|
1303
1303
|
conflictColumns: ["id"],
|
|
1304
1304
|
api: { include: [
|
|
@@ -1320,8 +1320,22 @@ ContentContributionAttachment = __decorateClass$9([TenantScoped({ mode: "optiona
|
|
|
1320
1320
|
//#endregion
|
|
1321
1321
|
//#region src/content-contribution-attachments.ts
|
|
1322
1322
|
var content_contribution_attachments_exports = /* @__PURE__ */ __exportAll({ ContentContributionAttachmentCollection: () => ContentContributionAttachmentCollection });
|
|
1323
|
+
var __defProp$10 = Object.defineProperty;
|
|
1324
|
+
var __getOwnPropDesc$10 = Object.getOwnPropertyDescriptor;
|
|
1325
|
+
var __defNormalProp$10 = (obj, key, value) => key in obj ? __defProp$10(obj, key, {
|
|
1326
|
+
enumerable: true,
|
|
1327
|
+
configurable: true,
|
|
1328
|
+
writable: true,
|
|
1329
|
+
value
|
|
1330
|
+
}) : obj[key] = value;
|
|
1331
|
+
var __decorateClass$10 = (decorators, target, key, kind) => {
|
|
1332
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$10(target, key) : target;
|
|
1333
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1334
|
+
if (kind && result) __defProp$10(target, key, result);
|
|
1335
|
+
return result;
|
|
1336
|
+
};
|
|
1337
|
+
var __publicField$10 = (obj, key, value) => __defNormalProp$10(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1323
1338
|
var ContentContributionAttachmentCollection = class extends SmrtCollection {
|
|
1324
|
-
static _itemClass = ContentContributionAttachment;
|
|
1325
1339
|
async listForContribution(contributionId) {
|
|
1326
1340
|
return this.list({
|
|
1327
1341
|
where: { contributionId },
|
|
@@ -1335,23 +1349,47 @@ var ContentContributionAttachmentCollection = class extends SmrtCollection {
|
|
|
1335
1349
|
});
|
|
1336
1350
|
}
|
|
1337
1351
|
};
|
|
1352
|
+
__publicField$10(ContentContributionAttachmentCollection, "__smrtPackage__", "@happyvertical/smrt-content");
|
|
1353
|
+
__publicField$10(ContentContributionAttachmentCollection, "_itemClass", ContentContributionAttachment);
|
|
1354
|
+
ContentContributionAttachmentCollection = __decorateClass$10([smrt({
|
|
1355
|
+
tableName: "content_contribution_attachments",
|
|
1356
|
+
conflictColumns: ["id"],
|
|
1357
|
+
api: { include: [
|
|
1358
|
+
"list",
|
|
1359
|
+
"get",
|
|
1360
|
+
"create",
|
|
1361
|
+
"update",
|
|
1362
|
+
"delete",
|
|
1363
|
+
"listForContribution",
|
|
1364
|
+
"listForRevision"
|
|
1365
|
+
] },
|
|
1366
|
+
mcp: { include: [
|
|
1367
|
+
"list",
|
|
1368
|
+
"get",
|
|
1369
|
+
"create",
|
|
1370
|
+
"update",
|
|
1371
|
+
"delete",
|
|
1372
|
+
"listForContribution",
|
|
1373
|
+
"listForRevision"
|
|
1374
|
+
] }
|
|
1375
|
+
})], ContentContributionAttachmentCollection);
|
|
1338
1376
|
//#endregion
|
|
1339
1377
|
//#region src/content-contribution-revision.ts
|
|
1340
|
-
var __defProp$
|
|
1341
|
-
var __getOwnPropDesc$
|
|
1342
|
-
var __defNormalProp$
|
|
1378
|
+
var __defProp$9 = Object.defineProperty;
|
|
1379
|
+
var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
|
|
1380
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, {
|
|
1343
1381
|
enumerable: true,
|
|
1344
1382
|
configurable: true,
|
|
1345
1383
|
writable: true,
|
|
1346
1384
|
value
|
|
1347
1385
|
}) : obj[key] = value;
|
|
1348
|
-
var __decorateClass$
|
|
1349
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
1386
|
+
var __decorateClass$9 = (decorators, target, key, kind) => {
|
|
1387
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
|
|
1350
1388
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1351
|
-
if (kind && result) __defProp$
|
|
1389
|
+
if (kind && result) __defProp$9(target, key, result);
|
|
1352
1390
|
return result;
|
|
1353
1391
|
};
|
|
1354
|
-
var __publicField$
|
|
1392
|
+
var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1355
1393
|
function parseMetadata$2(raw) {
|
|
1356
1394
|
if (!raw) return {};
|
|
1357
1395
|
if (typeof raw === "object") return { ...raw };
|
|
@@ -1403,11 +1441,11 @@ var ContentContributionRevision = class extends SmrtObject {
|
|
|
1403
1441
|
};
|
|
1404
1442
|
}
|
|
1405
1443
|
};
|
|
1406
|
-
__publicField$
|
|
1407
|
-
__decorateClass$
|
|
1408
|
-
__decorateClass$
|
|
1409
|
-
__decorateClass$
|
|
1410
|
-
ContentContributionRevision = __decorateClass$
|
|
1444
|
+
__publicField$9(ContentContributionRevision, "__smrtPackage__", "@happyvertical/smrt-content");
|
|
1445
|
+
__decorateClass$9([foreignKey("ContentContribution", { required: true })], ContentContributionRevision.prototype, "contributionId", 2);
|
|
1446
|
+
__decorateClass$9([crossPackageRef("@happyvertical/smrt-messages:Message")], ContentContributionRevision.prototype, "sourceMessageId", 2);
|
|
1447
|
+
__decorateClass$9([tenantId({ nullable: true })], ContentContributionRevision.prototype, "tenantId", 2);
|
|
1448
|
+
ContentContributionRevision = __decorateClass$9([TenantScoped({ mode: "optional" }), smrt({
|
|
1411
1449
|
tableName: "content_contribution_revisions",
|
|
1412
1450
|
conflictColumns: ["contribution_id", "revision_number"],
|
|
1413
1451
|
api: { include: [
|
|
@@ -1447,21 +1485,21 @@ var ContentContributionRevisionCollection = class extends SmrtCollection {
|
|
|
1447
1485
|
};
|
|
1448
1486
|
//#endregion
|
|
1449
1487
|
//#region src/content-contribution-type.ts
|
|
1450
|
-
var __defProp$
|
|
1451
|
-
var __getOwnPropDesc$
|
|
1452
|
-
var __defNormalProp$
|
|
1488
|
+
var __defProp$8 = Object.defineProperty;
|
|
1489
|
+
var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
|
|
1490
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, {
|
|
1453
1491
|
enumerable: true,
|
|
1454
1492
|
configurable: true,
|
|
1455
1493
|
writable: true,
|
|
1456
1494
|
value
|
|
1457
1495
|
}) : obj[key] = value;
|
|
1458
|
-
var __decorateClass$
|
|
1459
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
1496
|
+
var __decorateClass$8 = (decorators, target, key, kind) => {
|
|
1497
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
|
|
1460
1498
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1461
|
-
if (kind && result) __defProp$
|
|
1499
|
+
if (kind && result) __defProp$8(target, key, result);
|
|
1462
1500
|
return result;
|
|
1463
1501
|
};
|
|
1464
|
-
var __publicField$
|
|
1502
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1465
1503
|
function parseJSON(raw, fallback) {
|
|
1466
1504
|
if (!raw) return fallback;
|
|
1467
1505
|
if (typeof raw === "object") return structuredClone(raw);
|
|
@@ -1567,10 +1605,10 @@ var ContentContributionType = class extends SmrtObject {
|
|
|
1567
1605
|
return super.delete();
|
|
1568
1606
|
}
|
|
1569
1607
|
};
|
|
1570
|
-
__publicField$
|
|
1571
|
-
__decorateClass$
|
|
1572
|
-
__decorateClass$
|
|
1573
|
-
ContentContributionType = __decorateClass$
|
|
1608
|
+
__publicField$8(ContentContributionType, "__smrtPackage__", "@happyvertical/smrt-content");
|
|
1609
|
+
__decorateClass$8([field({ required: true })], ContentContributionType.prototype, "key", 2);
|
|
1610
|
+
__decorateClass$8([tenantId({ nullable: true })], ContentContributionType.prototype, "tenantId", 2);
|
|
1611
|
+
ContentContributionType = __decorateClass$8([TenantScoped({ mode: "optional" }), smrt({
|
|
1574
1612
|
tableName: "content_contribution_types",
|
|
1575
1613
|
conflictColumns: ["tenant_id", "key"],
|
|
1576
1614
|
api: { include: [
|
|
@@ -1607,21 +1645,21 @@ var ContentContributionTypeCollection = class extends SmrtCollection {
|
|
|
1607
1645
|
};
|
|
1608
1646
|
//#endregion
|
|
1609
1647
|
//#region src/content-contributor.ts
|
|
1610
|
-
var __defProp$
|
|
1611
|
-
var __getOwnPropDesc$
|
|
1612
|
-
var __defNormalProp$
|
|
1648
|
+
var __defProp$7 = Object.defineProperty;
|
|
1649
|
+
var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
|
|
1650
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, {
|
|
1613
1651
|
enumerable: true,
|
|
1614
1652
|
configurable: true,
|
|
1615
1653
|
writable: true,
|
|
1616
1654
|
value
|
|
1617
1655
|
}) : obj[key] = value;
|
|
1618
|
-
var __decorateClass$
|
|
1619
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
1656
|
+
var __decorateClass$7 = (decorators, target, key, kind) => {
|
|
1657
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
|
|
1620
1658
|
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1621
|
-
if (kind && result) __defProp$
|
|
1659
|
+
if (kind && result) __defProp$7(target, key, result);
|
|
1622
1660
|
return result;
|
|
1623
1661
|
};
|
|
1624
|
-
var __publicField$
|
|
1662
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1625
1663
|
function parseMetadata$1(raw) {
|
|
1626
1664
|
if (!raw) return {};
|
|
1627
1665
|
if (typeof raw === "object") return { ...raw };
|
|
@@ -1667,11 +1705,11 @@ var ContentContributor = class extends SmrtObject {
|
|
|
1667
1705
|
};
|
|
1668
1706
|
}
|
|
1669
1707
|
};
|
|
1670
|
-
__publicField$
|
|
1671
|
-
__decorateClass$
|
|
1672
|
-
__decorateClass$
|
|
1673
|
-
__decorateClass$
|
|
1674
|
-
ContentContributor = __decorateClass$
|
|
1708
|
+
__publicField$7(ContentContributor, "__smrtPackage__", "@happyvertical/smrt-content");
|
|
1709
|
+
__decorateClass$7([crossPackageRef("@happyvertical/smrt-profiles:Profile")], ContentContributor.prototype, "profileId", 2);
|
|
1710
|
+
__decorateClass$7([field({ required: true })], ContentContributor.prototype, "email", 2);
|
|
1711
|
+
__decorateClass$7([tenantId({ nullable: true })], ContentContributor.prototype, "tenantId", 2);
|
|
1712
|
+
ContentContributor = __decorateClass$7([TenantScoped({ mode: "optional" }), smrt({
|
|
1675
1713
|
tableName: "content_contributors",
|
|
1676
1714
|
conflictColumns: ["email"],
|
|
1677
1715
|
api: { include: [
|
|
@@ -1693,8 +1731,22 @@ ContentContributor = __decorateClass$6([TenantScoped({ mode: "optional" }), smrt
|
|
|
1693
1731
|
//#endregion
|
|
1694
1732
|
//#region src/content-contributors.ts
|
|
1695
1733
|
var content_contributors_exports = /* @__PURE__ */ __exportAll({ ContentContributorCollection: () => ContentContributorCollection });
|
|
1734
|
+
var __defProp$6 = Object.defineProperty;
|
|
1735
|
+
var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
|
|
1736
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, {
|
|
1737
|
+
enumerable: true,
|
|
1738
|
+
configurable: true,
|
|
1739
|
+
writable: true,
|
|
1740
|
+
value
|
|
1741
|
+
}) : obj[key] = value;
|
|
1742
|
+
var __decorateClass$6 = (decorators, target, key, kind) => {
|
|
1743
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
|
|
1744
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1745
|
+
if (kind && result) __defProp$6(target, key, result);
|
|
1746
|
+
return result;
|
|
1747
|
+
};
|
|
1748
|
+
var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1696
1749
|
var ContentContributorCollection = class extends SmrtCollection {
|
|
1697
|
-
static _itemClass = ContentContributor;
|
|
1698
1750
|
async getByEmail(email) {
|
|
1699
1751
|
return this.get({ email: email.toLowerCase().trim() });
|
|
1700
1752
|
}
|
|
@@ -1737,6 +1789,30 @@ var ContentContributorCollection = class extends SmrtCollection {
|
|
|
1737
1789
|
return contributor;
|
|
1738
1790
|
}
|
|
1739
1791
|
};
|
|
1792
|
+
__publicField$6(ContentContributorCollection, "__smrtPackage__", "@happyvertical/smrt-content");
|
|
1793
|
+
__publicField$6(ContentContributorCollection, "_itemClass", ContentContributor);
|
|
1794
|
+
ContentContributorCollection = __decorateClass$6([smrt({
|
|
1795
|
+
tableName: "content_contributors",
|
|
1796
|
+
conflictColumns: ["email"],
|
|
1797
|
+
api: { include: [
|
|
1798
|
+
"list",
|
|
1799
|
+
"get",
|
|
1800
|
+
"create",
|
|
1801
|
+
"update",
|
|
1802
|
+
"delete",
|
|
1803
|
+
"getByEmail",
|
|
1804
|
+
"getByProfileId"
|
|
1805
|
+
] },
|
|
1806
|
+
mcp: { include: [
|
|
1807
|
+
"list",
|
|
1808
|
+
"get",
|
|
1809
|
+
"create",
|
|
1810
|
+
"update",
|
|
1811
|
+
"delete",
|
|
1812
|
+
"getByEmail",
|
|
1813
|
+
"getByProfileId"
|
|
1814
|
+
] }
|
|
1815
|
+
})], ContentContributorCollection);
|
|
1740
1816
|
//#endregion
|
|
1741
1817
|
//#region src/content-contributions.ts
|
|
1742
1818
|
var __defProp$5 = Object.defineProperty;
|