@runtypelabs/sdk 4.19.2 → 4.20.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/index.cjs +27 -3
- package/dist/index.d.cts +556 -9
- package/dist/index.d.ts +556 -9
- package/dist/index.mjs +26 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4270,13 +4270,17 @@ function defineFpo(fpo) {
|
|
|
4270
4270
|
return fpo;
|
|
4271
4271
|
}
|
|
4272
4272
|
async function ensureFpo(client, fpo, options = {}) {
|
|
4273
|
-
const { dryRun, onConflict } = options;
|
|
4273
|
+
const { dryRun, onConflict, prune } = options;
|
|
4274
4274
|
return client.post("/products/ensure-fpo", {
|
|
4275
4275
|
fpo,
|
|
4276
4276
|
...dryRun ? { dryRun: true } : {},
|
|
4277
|
-
...onConflict ? { onConflict } : {}
|
|
4277
|
+
...onConflict ? { onConflict } : {},
|
|
4278
|
+
...prune ? { prune: true } : {}
|
|
4278
4279
|
});
|
|
4279
4280
|
}
|
|
4281
|
+
async function pullFpo(client, name) {
|
|
4282
|
+
return client.get("/products/pull-fpo", { name });
|
|
4283
|
+
}
|
|
4280
4284
|
|
|
4281
4285
|
// src/products-namespace.ts
|
|
4282
4286
|
var ProductsNamespace = class {
|
|
@@ -4334,6 +4338,24 @@ var ProductsNamespace = class {
|
|
|
4334
4338
|
async ensureFpo(fpo, options = {}) {
|
|
4335
4339
|
return ensureFpo(this.getClient(), fpo, options);
|
|
4336
4340
|
}
|
|
4341
|
+
/**
|
|
4342
|
+
* Reconstruct a self-contained Full Product Object from the live product graph
|
|
4343
|
+
* (resolved by name) — the absorb-drift direction of `ensureFpo`. Feeding the
|
|
4344
|
+
* returned `fpo` back into `ensureFpo` converges to `unchanged`.
|
|
4345
|
+
*
|
|
4346
|
+
* records/schedules/secrets are not reconstructed and `tools` is emitted empty
|
|
4347
|
+
* (tool refs are portable `tool:<name>`); inspect `result.warnings` for
|
|
4348
|
+
* per-pull caveats.
|
|
4349
|
+
*
|
|
4350
|
+
* @example
|
|
4351
|
+
* ```typescript
|
|
4352
|
+
* const { fpo } = await Runtype.products.pullFpo('Support Copilot')
|
|
4353
|
+
* await Runtype.products.ensureFpo(fpo, { dryRun: true }) // → result: 'unchanged'
|
|
4354
|
+
* ```
|
|
4355
|
+
*/
|
|
4356
|
+
async pullFpo(name) {
|
|
4357
|
+
return pullFpo(this.getClient(), name);
|
|
4358
|
+
}
|
|
4337
4359
|
};
|
|
4338
4360
|
|
|
4339
4361
|
// src/surfaces-ensure.ts
|
|
@@ -5072,7 +5094,7 @@ var Runtype = class {
|
|
|
5072
5094
|
|
|
5073
5095
|
// src/version.ts
|
|
5074
5096
|
var FALLBACK_VERSION = "0.0.0";
|
|
5075
|
-
var SDK_VERSION = "4.
|
|
5097
|
+
var SDK_VERSION = "4.20.0".length > 0 ? "4.20.0" : FALLBACK_VERSION;
|
|
5076
5098
|
var RUNTYPE_CLIENT_KIND = "sdk";
|
|
5077
5099
|
var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
|
|
5078
5100
|
|
|
@@ -12818,6 +12840,7 @@ export {
|
|
|
12818
12840
|
parseOffloadedOutputId,
|
|
12819
12841
|
parseSSEChunk,
|
|
12820
12842
|
processStream,
|
|
12843
|
+
pullFpo,
|
|
12821
12844
|
registerWorkflowHook,
|
|
12822
12845
|
resolveStallStopAfter,
|
|
12823
12846
|
resolveWorkflowHook,
|
package/package.json
CHANGED