@seamapi/nextlove-sdk-generator
Advanced tools
Comparing version 1.14.1 to 1.14.2
@@ -29,5 +29,8 @@ import { endpoints_returning_deprecated_action_attempt } from "../../lib/endpoint-rules.js"; | ||
serialize() { | ||
const should_import_action_attempt_helpers = this.methods.some(({ return_resource }) => return_resource === "ActionAttempt"); | ||
return [ | ||
`# frozen_string_literal: true`, | ||
``, | ||
`${should_import_action_attempt_helpers | ||
? '\nrequire "seam/helpers/action_attempt"\n' | ||
: ""}`, | ||
`module Seam`, | ||
@@ -69,3 +72,3 @@ ` module Clients`, | ||
can_method_poll_action_attempt | ||
? " action_attempt.decide_and_wait(wait_for_action_attempt)\n action_attempt" | ||
? " Helpers::ActionAttempt.decide_and_wait(action_attempt, @client, wait_for_action_attempt)" | ||
: [], | ||
@@ -72,0 +75,0 @@ !has_return_value || returns_deprecated_action_attempt |
@@ -1,2 +0,1 @@ | ||
import actionAttemptDecideAndWaitTemplate from "./action-attempt-decide-and-wait-template.js"; | ||
export default ({ pascal_name, attrs, date_attrs, }) => { | ||
@@ -18,7 +17,4 @@ const no_error_warning_attrs = attrs.filter((attr) => attr !== "errors" && attr !== "warnings"); | ||
: ""; | ||
const is_action_attempt_resource = pascal_name === "ActionAttempt"; | ||
return `# frozen_string_literal: true | ||
${is_action_attempt_resource ? 'require "seam/utils/action_attempt_utils"' : ""} | ||
module Seam | ||
@@ -32,4 +28,2 @@ class ${pascal_name} < BaseResource | ||
${resource_warnings_support} | ||
${is_action_attempt_resource ? actionAttemptDecideAndWaitTemplate() : ""} | ||
end | ||
@@ -36,0 +30,0 @@ end\n`; |
{ | ||
"name": "@seamapi/nextlove-sdk-generator", | ||
"version": "1.14.1", | ||
"version": "1.14.2", | ||
"description": "Utilities for building NextLove SDK Generators", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -55,5 +55,13 @@ import { endpoints_returning_deprecated_action_attempt } from "lib/endpoint-rules.js" | ||
serialize() { | ||
const should_import_action_attempt_helpers = this.methods.some( | ||
({ return_resource }) => return_resource === "ActionAttempt" | ||
) | ||
return [ | ||
`# frozen_string_literal: true`, | ||
``, | ||
`${ | ||
should_import_action_attempt_helpers | ||
? '\nrequire "seam/helpers/action_attempt"\n' | ||
: "" | ||
}`, | ||
`module Seam`, | ||
@@ -108,3 +116,3 @@ ` module Clients`, | ||
can_method_poll_action_attempt | ||
? " action_attempt.decide_and_wait(wait_for_action_attempt)\n action_attempt" | ||
? " Helpers::ActionAttempt.decide_and_wait(action_attempt, @client, wait_for_action_attempt)" | ||
: [], | ||
@@ -111,0 +119,0 @@ !has_return_value || returns_deprecated_action_attempt |
@@ -1,3 +0,1 @@ | ||
import actionAttemptDecideAndWaitTemplate from "./action-attempt-decide-and-wait-template.js" | ||
export default ({ | ||
@@ -33,8 +31,4 @@ pascal_name, | ||
const is_action_attempt_resource = pascal_name === "ActionAttempt" | ||
return `# frozen_string_literal: true | ||
${is_action_attempt_resource ? 'require "seam/utils/action_attempt_utils"' : ""} | ||
module Seam | ||
@@ -48,6 +42,4 @@ class ${pascal_name} < BaseResource | ||
${resource_warnings_support} | ||
${is_action_attempt_resource ? actionAttemptDecideAndWaitTemplate() : ""} | ||
end | ||
end\n` | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
655649
271
8264