@workos/oagen-emitters 0.18.2 → 0.18.3

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.18.2"
2
+ ".": "0.18.3"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.18.3](https://github.com/workos/oagen-emitters/compare/v0.18.2...v0.18.3) (2026-06-17)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **dotnet:** emit envelope fixture for list-wrappers returned by non-paginated ops ([#157](https://github.com/workos/oagen-emitters/issues/157)) ([76e89b5](https://github.com/workos/oagen-emitters/commit/76e89b58592cfab9af07bdfc34f93d8569c9d220))
9
+ * **node:** only adopt named request interface for pure object-literal params ([#156](https://github.com/workos/oagen-emitters/issues/156)) ([50116e3](https://github.com/workos/oagen-emitters/commit/50116e320a9faa67691b89f97dc732f8b66405c5))
10
+
3
11
  ## [0.18.2](https://github.com/workos/oagen-emitters/compare/v0.18.1...v0.18.2) (2026-06-17)
4
12
 
5
13
 
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as fieldName$4, B as servicePropertyName, C as apiClassName, D as dotnetEmitter, E as propertyName, F as fieldName$3, H as fieldName$1, I as methodName, L as trimMountedResourceFromMethod, M as trimMountedResourceFromMethod$1, N as goEmitter, O as appendAsyncSuffix, P as className, R as phpEmitter, S as kotlinEmitter, T as packageSegment, U as safeParamName$1, V as pythonEmitter, W as nodeEmitter, _ as rubyEmitter, a as rustExtractor, b as resolveServiceTarget, c as pythonExtractor, d as rustEmitter, f as fieldName$5, g as typeName, h as resourceAccessorName, i as kotlinExtractor, j as methodName$1, k as className$1, l as rubyExtractor, m as moduleName, n as elixirExtractor, o as goExtractor, p as methodName$3, r as dotnetExtractor, s as phpExtractor, t as workosEmittersPlugin, u as nodeExtractor, v as buildExportedClassNameSet, w as methodName$2, x as safeParamName, y as fieldName, z as fieldName$2 } from "./plugin-bqfwowQ3.mjs";
1
+ import { A as fieldName$4, B as servicePropertyName, C as apiClassName, D as dotnetEmitter, E as propertyName, F as fieldName$3, H as fieldName$1, I as methodName, L as trimMountedResourceFromMethod, M as trimMountedResourceFromMethod$1, N as goEmitter, O as appendAsyncSuffix, P as className, R as phpEmitter, S as kotlinEmitter, T as packageSegment, U as safeParamName$1, V as pythonEmitter, W as nodeEmitter, _ as rubyEmitter, a as rustExtractor, b as resolveServiceTarget, c as pythonExtractor, d as rustEmitter, f as fieldName$5, g as typeName, h as resourceAccessorName, i as kotlinExtractor, j as methodName$1, k as className$1, l as rubyExtractor, m as moduleName, n as elixirExtractor, o as goExtractor, p as methodName$3, r as dotnetExtractor, s as phpExtractor, t as workosEmittersPlugin, u as nodeExtractor, v as buildExportedClassNameSet, w as methodName$2, x as safeParamName, y as fieldName, z as fieldName$2 } from "./plugin-1ckLMpgo.mjs";
2
2
  import { collectSnippetArgs, collectWrapperArgs, toSnakeCase } from "@workos/oagen";
3
3
  //#region src/snippets/ruby.ts
4
4
  const INDENT$6 = " ";
@@ -5592,10 +5592,21 @@ function optionsObjectShouldBeOptional(op, plan, resolvedOp) {
5592
5592
  function operationHasOptionsInput(op, plan, resolvedOp) {
5593
5593
  return op.pathParams.length > 0 || plan.hasBody || plan.isPaginated || visibleQueryParamsForOptions(op, plan, resolvedOp).length > 0;
5594
5594
  }
5595
+ function isClosedObjectLiteral(type) {
5596
+ const t = type.trim();
5597
+ if (!t.startsWith("{")) return false;
5598
+ let depth = 0;
5599
+ for (let i = 0; i < t.length; i++) {
5600
+ const ch = t[i];
5601
+ if (ch === "{") depth++;
5602
+ else if (ch === "}" && --depth === 0) return i === t.length - 1;
5603
+ }
5604
+ return false;
5605
+ }
5595
5606
  function optionsObjectInfo(service, method, op, plan, ctx, baselineMethod, resolvedOp) {
5596
5607
  const baseline = optionsObjectParam$1(baselineMethod);
5597
5608
  if (baseline) {
5598
- if (baseline.type.trimStart().startsWith("{") && isNodeOwnedService(ctx, service.name, resolveResourceClassName$3(service, ctx))) {
5609
+ if (isClosedObjectLiteral(baseline.type) && isNodeOwnedService(ctx, service.name, resolveResourceClassName$3(service, ctx))) {
5599
5610
  const body = extractRequestBodyType(op, ctx);
5600
5611
  if (body?.kind === "model") return {
5601
5612
  name: "options",
@@ -21136,9 +21147,10 @@ function generateFixtures$1(spec) {
21136
21147
  const modelMap = new Map(spec.models.map((m) => [m.name, m]));
21137
21148
  const enumMap = new Map(spec.enums.map((e) => [e.name, e]));
21138
21149
  const files = [];
21150
+ const nonPaginatedWrapperRefs = collectNonPaginatedResponseModelNames(spec.services);
21139
21151
  for (const model of spec.models) {
21140
21152
  if (isListMetadataModel(model)) continue;
21141
- if (isListWrapperModel(model)) continue;
21153
+ if (isListWrapperModel(model) && !nonPaginatedWrapperRefs.has(model.name)) continue;
21142
21154
  const fixture = model.fields.length === 0 ? {} : generateModelFixture$1(model, modelMap, enumMap);
21143
21155
  files.push({
21144
21156
  path: `testdata/${fixtureFileName(model.name)}.json`,
@@ -29918,4 +29930,4 @@ const workosEmittersPlugin = {
29918
29930
  //#endregion
29919
29931
  export { fieldName$2 as A, servicePropertyName$2 as B, apiClassName as C, dotnetEmitter as D, propertyName as E, fieldName$3 as F, fieldName$5 as H, methodName$3 as I, trimMountedResourceFromMethod$2 as L, trimMountedResourceFromMethod$1 as M, goEmitter as N, appendAsyncSuffix as O, className$3 as P, phpEmitter as R, kotlinEmitter as S, packageSegment as T, safeParamName$1 as U, pythonEmitter as V, nodeEmitter as W, rubyEmitter as _, rustExtractor as a, resolveServiceTarget as b, pythonExtractor as c, rustEmitter as d, fieldName as f, typeName as g, resourceAccessorName as h, kotlinExtractor as i, methodName$2 as j, className$2 as k, rubyExtractor as l, moduleName as m, elixirExtractor as n, goExtractor as o, methodName as p, dotnetExtractor as r, phpExtractor as s, workosEmittersPlugin as t, nodeExtractor as u, buildExportedClassNameSet as v, methodName$1 as w, safeParamName as x, fieldName$1 as y, fieldName$4 as z };
29920
29932
 
29921
- //# sourceMappingURL=plugin-bqfwowQ3.mjs.map
29933
+ //# sourceMappingURL=plugin-1ckLMpgo.mjs.map