@runtypelabs/sdk 9.5.1 → 9.7.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 CHANGED
@@ -2891,6 +2891,17 @@ async function pullFlow(client, name) {
2891
2891
  }
2892
2892
 
2893
2893
  // src/flows-namespace.ts
2894
+ function isPersistedFlowHashMiss(err) {
2895
+ if (err == null || typeof err !== "object") return false;
2896
+ const message = err instanceof Error ? err.message : "";
2897
+ const statusCode = err.statusCode;
2898
+ const is422 = statusCode === 422 || statusCode === void 0 && /\b422\b/.test(message);
2899
+ if (!is422) return false;
2900
+ const data = err.data;
2901
+ const code = data && typeof data === "object" ? data.code : void 0;
2902
+ if (code !== void 0) return code === "FLOW_DEFINITION_REQUIRED";
2903
+ return message.includes("FLOW_DEFINITION_REQUIRED");
2904
+ }
2894
2905
  var FlowsNamespace = class {
2895
2906
  constructor(getClient) {
2896
2907
  this.getClient = getClient;
@@ -3868,8 +3879,7 @@ var RuntypeFlowBuilder = class {
3868
3879
  try {
3869
3880
  return await client.dispatch(hashOnlyConfig);
3870
3881
  } catch (err) {
3871
- const is422 = err != null && typeof err === "object" && "statusCode" in err && err.statusCode === 422 || err instanceof Error && /\b422\b/.test(err.message);
3872
- if (!is422) {
3882
+ if (!isPersistedFlowHashMiss(err)) {
3873
3883
  throw err;
3874
3884
  }
3875
3885
  }
@@ -4924,7 +4934,8 @@ var AGENT_CONFIG_KEYS = [
4924
4934
  "memory",
4925
4935
  "sandbox",
4926
4936
  "tenancyStrategy",
4927
- "durability"
4937
+ "durability",
4938
+ "state"
4928
4939
  ];
4929
4940
  var AGENT_CONFIG_KEY_LIST = [...AGENT_CONFIG_KEYS].sort();
4930
4941
  function isPlainObject2(value) {
@@ -6484,7 +6495,7 @@ var Runtype = class {
6484
6495
 
6485
6496
  // src/version.ts
6486
6497
  var FALLBACK_VERSION = "0.0.0";
6487
- var SDK_VERSION = "9.5.1".length > 0 ? "9.5.1" : FALLBACK_VERSION;
6498
+ var SDK_VERSION = "9.7.0".length > 0 ? "9.7.0" : FALLBACK_VERSION;
6488
6499
  var RUNTYPE_CLIENT_KIND = "sdk";
6489
6500
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
6490
6501
 
@@ -13240,6 +13251,17 @@ var IntegrationsEndpoint = class {
13240
13251
  async generateSlackManifest(data) {
13241
13252
  return this.client.post("/integrations/slack/manifest", data);
13242
13253
  }
13254
+ /**
13255
+ * Report whether Slack has verified a surface's events URL. Slack sends that
13256
+ * challenge when an app is created from a manifest, so a `verifiedAt` newer
13257
+ * than the one read before the manifest was handed out is evidence the app
13258
+ * now exists. Markers expire after an hour.
13259
+ */
13260
+ async getSlackAppStatus(surfaceId) {
13261
+ return this.client.get(
13262
+ `/integrations/slack/app-status?surfaceId=${encodeURIComponent(surfaceId)}`
13263
+ );
13264
+ }
13243
13265
  };
13244
13266
  var BillingEndpoint = class {
13245
13267
  constructor(client) {