@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.mjs
CHANGED
|
@@ -16762,18 +16762,29 @@ async function findCreatorIdForApiKey(config) {
|
|
|
16762
16762
|
|
|
16763
16763
|
// src/pitches.ts
|
|
16764
16764
|
var import_pitch_core = __toESM(require_dist2(), 1);
|
|
16765
|
+
var STRIPPED_SYSTEM_FIELDS = /* @__PURE__ */ new Set([
|
|
16766
|
+
"$databaseId",
|
|
16767
|
+
"$tableId",
|
|
16768
|
+
"$collection",
|
|
16769
|
+
"$collectionId",
|
|
16770
|
+
"$permissions"
|
|
16771
|
+
]);
|
|
16765
16772
|
function rowToPitch(doc) {
|
|
16766
16773
|
const sections = Array.isArray(doc.sections) ? doc.sections : [];
|
|
16767
16774
|
const lifecycle = (0, import_pitch_core.lifecycleFromRow)({
|
|
16768
16775
|
status: String(doc.status ?? "draft"),
|
|
16769
16776
|
previewToken: doc.previewToken
|
|
16770
16777
|
});
|
|
16771
|
-
|
|
16778
|
+
const pitch = {
|
|
16772
16779
|
...doc,
|
|
16773
16780
|
sections,
|
|
16774
16781
|
lifecycle,
|
|
16775
16782
|
status: String(doc.status ?? "draft")
|
|
16776
16783
|
};
|
|
16784
|
+
for (const k of STRIPPED_SYSTEM_FIELDS) {
|
|
16785
|
+
delete pitch[k];
|
|
16786
|
+
}
|
|
16787
|
+
return pitch;
|
|
16777
16788
|
}
|
|
16778
16789
|
function validatePitchContent(framework, sections) {
|
|
16779
16790
|
if (!(0, import_pitch_core.isFrameworkId)(framework)) {
|
|
@@ -16851,6 +16862,9 @@ var PitchesApi = class {
|
|
|
16851
16862
|
if (input.honestyDisclosure != null && input.honestyDisclosure !== "") {
|
|
16852
16863
|
payload.honestyDisclosure = String(input.honestyDisclosure).slice(0, 2e3);
|
|
16853
16864
|
}
|
|
16865
|
+
if (input.dryRun === true) {
|
|
16866
|
+
payload.dryRun = true;
|
|
16867
|
+
}
|
|
16854
16868
|
const doc = await fetchPitches(this.config, {
|
|
16855
16869
|
method: "POST",
|
|
16856
16870
|
path: "/pitches",
|