@honest-pitches/pitch-sdk 0.5.2 → 0.5.4
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/index.cjs +15 -1
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +15 -1
- package/dist/index.mjs.map +2 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -16788,18 +16788,29 @@ async function findCreatorIdForApiKey(config) {
|
|
|
16788
16788
|
|
|
16789
16789
|
// src/pitches.ts
|
|
16790
16790
|
var import_pitch_core = __toESM(require_dist2(), 1);
|
|
16791
|
+
var STRIPPED_SYSTEM_FIELDS = /* @__PURE__ */ new Set([
|
|
16792
|
+
"$databaseId",
|
|
16793
|
+
"$tableId",
|
|
16794
|
+
"$collection",
|
|
16795
|
+
"$collectionId",
|
|
16796
|
+
"$permissions"
|
|
16797
|
+
]);
|
|
16791
16798
|
function rowToPitch(doc) {
|
|
16792
16799
|
const sections = Array.isArray(doc.sections) ? doc.sections : [];
|
|
16793
16800
|
const lifecycle = (0, import_pitch_core.lifecycleFromRow)({
|
|
16794
16801
|
status: String(doc.status ?? "draft"),
|
|
16795
16802
|
previewToken: doc.previewToken
|
|
16796
16803
|
});
|
|
16797
|
-
|
|
16804
|
+
const pitch = {
|
|
16798
16805
|
...doc,
|
|
16799
16806
|
sections,
|
|
16800
16807
|
lifecycle,
|
|
16801
16808
|
status: String(doc.status ?? "draft")
|
|
16802
16809
|
};
|
|
16810
|
+
for (const k of STRIPPED_SYSTEM_FIELDS) {
|
|
16811
|
+
delete pitch[k];
|
|
16812
|
+
}
|
|
16813
|
+
return pitch;
|
|
16803
16814
|
}
|
|
16804
16815
|
function validatePitchContent(framework, sections) {
|
|
16805
16816
|
if (!(0, import_pitch_core.isFrameworkId)(framework)) {
|
|
@@ -16877,6 +16888,9 @@ var PitchesApi = class {
|
|
|
16877
16888
|
if (input.honestyDisclosure != null && input.honestyDisclosure !== "") {
|
|
16878
16889
|
payload.honestyDisclosure = String(input.honestyDisclosure).slice(0, 2e3);
|
|
16879
16890
|
}
|
|
16891
|
+
if (input.dryRun === true) {
|
|
16892
|
+
payload.dryRun = true;
|
|
16893
|
+
}
|
|
16880
16894
|
const doc = await fetchPitches(this.config, {
|
|
16881
16895
|
method: "POST",
|
|
16882
16896
|
path: "/pitches",
|