@runtypelabs/sdk 9.6.0 → 9.8.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.mjs CHANGED
@@ -2696,6 +2696,17 @@ async function pullFlow(client, name) {
2696
2696
  }
2697
2697
 
2698
2698
  // src/flows-namespace.ts
2699
+ function isPersistedFlowHashMiss(err) {
2700
+ if (err == null || typeof err !== "object") return false;
2701
+ const message = err instanceof Error ? err.message : "";
2702
+ const statusCode = err.statusCode;
2703
+ const is422 = statusCode === 422 || statusCode === void 0 && /\b422\b/.test(message);
2704
+ if (!is422) return false;
2705
+ const data = err.data;
2706
+ const code = data && typeof data === "object" ? data.code : void 0;
2707
+ if (code !== void 0) return code === "FLOW_DEFINITION_REQUIRED";
2708
+ return message.includes("FLOW_DEFINITION_REQUIRED");
2709
+ }
2699
2710
  var FlowsNamespace = class {
2700
2711
  constructor(getClient) {
2701
2712
  this.getClient = getClient;
@@ -3673,8 +3684,7 @@ var RuntypeFlowBuilder = class {
3673
3684
  try {
3674
3685
  return await client.dispatch(hashOnlyConfig);
3675
3686
  } catch (err) {
3676
- const is422 = err != null && typeof err === "object" && "statusCode" in err && err.statusCode === 422 || err instanceof Error && /\b422\b/.test(err.message);
3677
- if (!is422) {
3687
+ if (!isPersistedFlowHashMiss(err)) {
3678
3688
  throw err;
3679
3689
  }
3680
3690
  }
@@ -4729,7 +4739,8 @@ var AGENT_CONFIG_KEYS = [
4729
4739
  "memory",
4730
4740
  "sandbox",
4731
4741
  "tenancyStrategy",
4732
- "durability"
4742
+ "durability",
4743
+ "state"
4733
4744
  ];
4734
4745
  var AGENT_CONFIG_KEY_LIST = [...AGENT_CONFIG_KEYS].sort();
4735
4746
  function isPlainObject2(value) {
@@ -6289,7 +6300,7 @@ var Runtype = class {
6289
6300
 
6290
6301
  // src/version.ts
6291
6302
  var FALLBACK_VERSION = "0.0.0";
6292
- var SDK_VERSION = "9.6.0".length > 0 ? "9.6.0" : FALLBACK_VERSION;
6303
+ var SDK_VERSION = "9.8.0".length > 0 ? "9.8.0" : FALLBACK_VERSION;
6293
6304
  var RUNTYPE_CLIENT_KIND = "sdk";
6294
6305
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
6295
6306
 
@@ -13045,6 +13056,17 @@ var IntegrationsEndpoint = class {
13045
13056
  async generateSlackManifest(data) {
13046
13057
  return this.client.post("/integrations/slack/manifest", data);
13047
13058
  }
13059
+ /**
13060
+ * Report whether Slack has verified a surface's events URL. Slack sends that
13061
+ * challenge when an app is created from a manifest, so a `verifiedAt` newer
13062
+ * than the one read before the manifest was handed out is evidence the app
13063
+ * now exists. Markers expire after an hour.
13064
+ */
13065
+ async getSlackAppStatus(surfaceId) {
13066
+ return this.client.get(
13067
+ `/integrations/slack/app-status?surfaceId=${encodeURIComponent(surfaceId)}`
13068
+ );
13069
+ }
13048
13070
  };
13049
13071
  var BillingEndpoint = class {
13050
13072
  constructor(client) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "9.6.0",
3
+ "version": "9.8.0",
4
4
  "type": "module",
5
5
  "description": "TypeScript SDK for the Runtype API with fluent methods. Use it to quickly realize AI products, agents, and workflows.",
6
6
  "main": "dist/index.cjs",