@mytegroupinc/myte-core 0.0.10 → 0.0.11
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/cli.js +24 -4
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -2610,15 +2610,26 @@ async function runCreatePrd(args) {
|
|
|
2610
2610
|
return;
|
|
2611
2611
|
}
|
|
2612
2612
|
|
|
2613
|
+
const clientSessionId = firstNonEmptyString(args["client-session-id"], args.clientSessionId, args.client_session_id);
|
|
2614
|
+
|
|
2613
2615
|
if (payloads.length === 1) {
|
|
2614
2616
|
let data;
|
|
2617
|
+
const payload = payloads[0];
|
|
2618
|
+
if (clientSessionId) payload.client_session_id = clientSessionId;
|
|
2619
|
+
const idempotencyKey = resolveProjectMutationIdempotencyKey({
|
|
2620
|
+
args,
|
|
2621
|
+
operation: "create_prd",
|
|
2622
|
+
payload,
|
|
2623
|
+
});
|
|
2615
2624
|
try {
|
|
2616
|
-
data = await
|
|
2625
|
+
data = await postSuggestionsMutation({
|
|
2617
2626
|
apiBase,
|
|
2618
2627
|
key,
|
|
2619
|
-
payload
|
|
2628
|
+
payload,
|
|
2620
2629
|
timeoutMs,
|
|
2621
2630
|
endpoint: "/project-assistant/create-prd",
|
|
2631
|
+
idempotencyKey,
|
|
2632
|
+
clientSessionId,
|
|
2622
2633
|
});
|
|
2623
2634
|
} catch (err) {
|
|
2624
2635
|
if (err?.name === "AbortError") {
|
|
@@ -2662,12 +2673,21 @@ async function runCreatePrd(args) {
|
|
|
2662
2673
|
};
|
|
2663
2674
|
|
|
2664
2675
|
try {
|
|
2665
|
-
const
|
|
2676
|
+
const payload = { items: payloads };
|
|
2677
|
+
if (clientSessionId) payload.client_session_id = clientSessionId;
|
|
2678
|
+
const idempotencyKey = resolveProjectMutationIdempotencyKey({
|
|
2679
|
+
args,
|
|
2680
|
+
operation: "create_prds",
|
|
2681
|
+
payload,
|
|
2682
|
+
});
|
|
2683
|
+
const data = await postSuggestionsMutation({
|
|
2666
2684
|
apiBase,
|
|
2667
2685
|
key,
|
|
2668
|
-
payload
|
|
2686
|
+
payload,
|
|
2669
2687
|
timeoutMs,
|
|
2670
2688
|
endpoint: "/project-assistant/create-prds",
|
|
2689
|
+
idempotencyKey,
|
|
2690
|
+
clientSessionId,
|
|
2671
2691
|
});
|
|
2672
2692
|
aggregated.project_id = data.project_id || null;
|
|
2673
2693
|
aggregated.created_count = Number(data.created_count || 0);
|