@workos/oagen-emitters 0.18.1 → 0.18.2

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.1"
2
+ ".": "0.18.2"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.18.2](https://github.com/workos/oagen-emitters/compare/v0.18.1...v0.18.2) (2026-06-17)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **node:** adopt spec request interface for owned inline-literal params; dedupe common enums ([#154](https://github.com/workos/oagen-emitters/issues/154)) ([71e2d4f](https://github.com/workos/oagen-emitters/commit/71e2d4f4e05441a41217286b92a555237c3fd794))
9
+
3
10
  ## [0.18.1](https://github.com/workos/oagen-emitters/compare/v0.18.0...v0.18.1) (2026-06-17)
4
11
 
5
12
 
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-CtU_wbid.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-bqfwowQ3.mjs";
2
2
  import { collectSnippetArgs, collectWrapperArgs, toSnakeCase } from "@workos/oagen";
3
3
  //#region src/snippets/ruby.ts
4
4
  const INDENT$6 = " ";
@@ -4673,6 +4673,16 @@ function assignEnumsToServices(enums, services, models = [], ctx) {
4673
4673
  for (const name of collectFieldDependencies(model).enums) if (enumNames.has(name) && !enumToService.has(name)) enumToService.set(name, service);
4674
4674
  }
4675
4675
  }
4676
+ if (ctx) {
4677
+ const serviceNameMap = buildServiceNameMap(services, ctx);
4678
+ const toUnassign = [];
4679
+ for (const [name, service] of enumToService) {
4680
+ if (!isNodeOwnedService(ctx, service, serviceNameMap.get(service))) continue;
4681
+ const home = (ctx.apiSurface?.enums?.[name])?.sourceFile ?? (ctx.apiSurface?.typeAliases?.[name])?.sourceFile ?? liveSurfaceInterfacePath(name);
4682
+ if (home && home.startsWith("src/common/")) toUnassign.push(name);
4683
+ }
4684
+ for (const name of toUnassign) enumToService.delete(name);
4685
+ }
4676
4686
  return enumToService;
4677
4687
  }
4678
4688
  //#endregion
@@ -5584,7 +5594,18 @@ function operationHasOptionsInput(op, plan, resolvedOp) {
5584
5594
  }
5585
5595
  function optionsObjectInfo(service, method, op, plan, ctx, baselineMethod, resolvedOp) {
5586
5596
  const baseline = optionsObjectParam$1(baselineMethod);
5587
- if (baseline) return baseline;
5597
+ if (baseline) {
5598
+ if (baseline.type.trimStart().startsWith("{") && isNodeOwnedService(ctx, service.name, resolveResourceClassName$3(service, ctx))) {
5599
+ const body = extractRequestBodyType(op, ctx);
5600
+ if (body?.kind === "model") return {
5601
+ name: "options",
5602
+ type: resolveInterfaceName(body.name, ctx),
5603
+ optional: optionsObjectShouldBeOptional(op, plan, resolvedOp),
5604
+ generated: false
5605
+ };
5606
+ }
5607
+ return baseline;
5608
+ }
5588
5609
  const overrideType = operationOverrideFor$1(ctx, op)?.optionsType;
5589
5610
  if (overrideType) return {
5590
5611
  name: "options",
@@ -29897,4 +29918,4 @@ const workosEmittersPlugin = {
29897
29918
  //#endregion
29898
29919
  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 };
29899
29920
 
29900
- //# sourceMappingURL=plugin-CtU_wbid.mjs.map
29921
+ //# sourceMappingURL=plugin-bqfwowQ3.mjs.map