@seamapi/nextlove-sdk-generator
Advanced tools
Comparing version 1.8.2 to 1.8.3
@@ -15,2 +15,3 @@ import { getParameterAndResponseSchema } from "../../lib/index.js"; | ||
import smokeTestTemplate from "./templates/smoke-test.template.js"; | ||
import getPackageVersionTemplate from "./templates/getPackageVersion.php.template.js"; | ||
import mapParentToChildResources from "../../lib/openapi/map-parent-to-children-resource.js"; | ||
@@ -32,2 +33,3 @@ import resolveOpenapiSpec from "../../lib/openapi/resolve-openapi-spec.js"; | ||
fs["tests/SmokeTest.php"] = smokeTestTemplate(); | ||
fs["src/Utils/getPackageVersion.php"] = getPackageVersionTemplate(); | ||
const base_resource_object_names = []; | ||
@@ -34,0 +36,0 @@ for (const [schema_name, schema] of Object.entries(openapi.components.schemas)) { |
@@ -8,2 +8,3 @@ export const generateSeamClient = ({ resource_clients, resource_object_names, }) => { | ||
${resource_object_names.map((n) => `use Seam\\Objects\\${n};`).join("\n")} | ||
use Seam\\Utils\\PackageVersion; | ||
@@ -13,2 +14,4 @@ use GuzzleHttp\\Client as HTTPClient; | ||
define('LTS_VERSION', '1.0.0'); | ||
class SeamClient | ||
@@ -22,2 +25,3 @@ { | ||
public HTTPClient $client; | ||
public string $ltsVersion = LTS_VERSION; | ||
@@ -30,2 +34,3 @@ public function __construct( | ||
$this->api_key = $api_key; | ||
$seam_sdk_version = PackageVersion::get(); | ||
$this->client = new HTTPClient([ | ||
@@ -36,3 +41,6 @@ "base_uri" => $endpoint, | ||
"Authorization" => "Bearer " . $this->api_key, | ||
"User-Agent" => "Seam PHP Client 0.0.1", | ||
"User-Agent" => "Seam PHP Client ". $seam_sdk_version, | ||
"seam-sdk-name" => "seamapi/php", | ||
"seam-sdk-version" => $seam_sdk_version, | ||
"seam-lts-version" => $this->ltsVersion | ||
], | ||
@@ -39,0 +47,0 @@ "http_errors" => $throw_http_errors, |
{ | ||
"name": "@seamapi/nextlove-sdk-generator", | ||
"version": "1.8.2", | ||
"version": "1.8.3", | ||
"description": "Utilities for building NextLove SDK Generators", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -16,2 +16,3 @@ import type { Route, SdkGeneratorOptions } from "lib/types.js" | ||
import smokeTestTemplate from "./templates/smoke-test.template.js" | ||
import getPackageVersionTemplate from "./templates/getPackageVersion.php.template.js" | ||
import mapParentToChildResources from "lib/openapi/map-parent-to-children-resource.js" | ||
@@ -36,2 +37,3 @@ import resolveOpenapiSpec from "lib/openapi/resolve-openapi-spec.js" | ||
fs["tests/SmokeTest.php"] = smokeTestTemplate() | ||
fs["src/Utils/getPackageVersion.php"] = getPackageVersionTemplate() | ||
@@ -38,0 +40,0 @@ const base_resource_object_names: string[] = [] |
@@ -21,2 +21,3 @@ import type { PhpClient } from "./php-client.js" | ||
${resource_object_names.map((n) => `use Seam\\Objects\\${n};`).join("\n")} | ||
use Seam\\Utils\\PackageVersion; | ||
@@ -26,2 +27,4 @@ use GuzzleHttp\\Client as HTTPClient; | ||
define('LTS_VERSION', '1.0.0'); | ||
class SeamClient | ||
@@ -35,2 +38,3 @@ { | ||
public HTTPClient $client; | ||
public string $ltsVersion = LTS_VERSION; | ||
@@ -43,2 +47,3 @@ public function __construct( | ||
$this->api_key = $api_key; | ||
$seam_sdk_version = PackageVersion::get(); | ||
$this->client = new HTTPClient([ | ||
@@ -49,3 +54,6 @@ "base_uri" => $endpoint, | ||
"Authorization" => "Bearer " . $this->api_key, | ||
"User-Agent" => "Seam PHP Client 0.0.1", | ||
"User-Agent" => "Seam PHP Client ". $seam_sdk_version, | ||
"seam-sdk-name" => "seamapi/php", | ||
"seam-sdk-version" => $seam_sdk_version, | ||
"seam-lts-version" => $this->ltsVersion | ||
], | ||
@@ -52,0 +60,0 @@ "http_errors" => $throw_http_errors, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
717577
367
9778