@workos/oagen-emitters 0.15.1 → 0.15.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.15.1"
2
+ ".": "0.15.2"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.15.2](https://github.com/workos/oagen-emitters/compare/v0.15.1...v0.15.2) (2026-06-01)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **node:** align AutoPaginatable type param with serialized runtime shape ([#134](https://github.com/workos/oagen-emitters/issues/134)) ([43ddd64](https://github.com/workos/oagen-emitters/commit/43ddd64d5d56b4ff2e7ae19bfa1ee895d24cb60d))
9
+
3
10
  ## [0.15.1](https://github.com/workos/oagen-emitters/compare/v0.15.0...v0.15.1) (2026-06-01)
4
11
 
5
12
 
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as pythonEmitter, a as rustExtractor, c as pythonExtractor, d as rustEmitter, f as rubyEmitter, g as phpEmitter, h as goEmitter, i as kotlinExtractor, l as rubyExtractor, m as dotnetEmitter, n as elixirExtractor, o as goExtractor, p as kotlinEmitter, r as dotnetExtractor, s as phpExtractor, t as workosEmittersPlugin, u as nodeExtractor, v as nodeEmitter } from "./plugin-C2Hp2Vs2.mjs";
1
+ import { _ as pythonEmitter, a as rustExtractor, c as pythonExtractor, d as rustEmitter, f as rubyEmitter, g as phpEmitter, h as goEmitter, i as kotlinExtractor, l as rubyExtractor, m as dotnetEmitter, n as elixirExtractor, o as goExtractor, p as kotlinEmitter, r as dotnetExtractor, s as phpExtractor, t as workosEmittersPlugin, u as nodeExtractor, v as nodeEmitter } from "./plugin-Xkr83G9A.mjs";
2
2
  export { dotnetEmitter, dotnetExtractor, elixirExtractor, goEmitter, goExtractor, kotlinEmitter, kotlinExtractor, nodeEmitter, nodeExtractor, phpEmitter, phpExtractor, pythonEmitter, pythonExtractor, rubyEmitter, rubyExtractor, rustEmitter, rustExtractor, workosEmittersPlugin };
@@ -5545,8 +5545,9 @@ function renderOptionsObjectMethod(lines, op, plan, method, service, ctx, modelM
5545
5545
  const itemType = preferredBaselineTypeName(ctx, autoPaginatableItemType$1(baselineMethod?.returnType)) ?? (itemRawName ? resolveInterfaceName(itemRawName, ctx) : responseModel);
5546
5546
  if (!itemType) return false;
5547
5547
  const wireType = wireInterfaceName(itemType);
5548
- const returnType = preferredBaselineReturnType(ctx, baselineMethod?.returnType) ?? `Promise<AutoPaginatable<${itemType}>>`;
5549
5548
  const needsWireSerializer = op.queryParams.filter((p) => !PAGINATION_PARAM_NAMES.has(p.name)).some((p) => fieldName$6(p.name) !== wireFieldName(p.name));
5549
+ const paginationType = needsWireSerializer ? "PaginationOptions" : optionParam.type;
5550
+ const returnType = needsWireSerializer ? `Promise<AutoPaginatable<${itemType}, ${paginationType}>>` : preferredBaselineReturnType(ctx, baselineMethod?.returnType) ?? `Promise<AutoPaginatable<${itemType}, ${paginationType}>>`;
5550
5551
  const listOptionsExpr = needsWireSerializer ? `options ? serialize${optionParam.type}(options) : undefined` : "paginationOptions";
5551
5552
  lines.push(` async ${method}(${renderOptionsParam(optionParam)}): ${returnType} {`);
5552
5553
  renderOptionsObjectDestructure(lines, pathBindings, needsWireSerializer ? void 0 : "paginationOptions");
@@ -5696,12 +5697,14 @@ function resolveOptionsObjectField$1(localName, optionType, ctx) {
5696
5697
  function renderPaginatedMethod(lines, op, plan, method, itemType, pathStr, resolvedServiceName, specEnumNames) {
5697
5698
  const extraParams = op.queryParams.filter((p) => !PAGINATION_PARAM_NAMES.has(p.name));
5698
5699
  const optionsType = extraParams.length > 0 ? paginatedOptionsName(method, resolvedServiceName) : "PaginationOptions";
5699
- const serializerArg = extraParams.some((p) => fieldName$6(p.name) !== wireFieldName(p.name)) ? `, serialize${optionsType}` : "";
5700
+ const needsWireSerializer = extraParams.some((p) => fieldName$6(p.name) !== wireFieldName(p.name));
5701
+ const serializerArg = needsWireSerializer ? `, serialize${optionsType}` : "";
5700
5702
  const pathParams = buildPathParams(op, specEnumNames);
5701
5703
  const allParams = pathParams ? `${pathParams}, options?: ${optionsType}` : `options?: ${optionsType}`;
5702
5704
  const wireType = wireInterfaceName(itemType);
5703
5705
  const serializeCall = serializerArg ? `options ? serialize${optionsType}(options) : undefined` : "options";
5704
- lines.push(` async ${method}(${allParams}): Promise<AutoPaginatable<${itemType}, ${optionsType}>> {`);
5706
+ const paginationType = needsWireSerializer ? "PaginationOptions" : optionsType;
5707
+ lines.push(` async ${method}(${allParams}): Promise<AutoPaginatable<${itemType}, ${paginationType}>> {`);
5705
5708
  lines.push(` return new AutoPaginatable(`);
5706
5709
  lines.push(` await fetchAndDeserialize<${wireType}, ${itemType}>(`);
5707
5710
  lines.push(` this.workos,`);
@@ -28415,4 +28418,4 @@ const workosEmittersPlugin = {
28415
28418
  //#endregion
28416
28419
  export { pythonEmitter as _, rustExtractor as a, pythonExtractor as c, rustEmitter as d, rubyEmitter as f, phpEmitter as g, goEmitter as h, kotlinExtractor as i, rubyExtractor as l, dotnetEmitter as m, elixirExtractor as n, goExtractor as o, kotlinEmitter as p, dotnetExtractor as r, phpExtractor as s, workosEmittersPlugin as t, nodeExtractor as u, nodeEmitter as v };
28417
28420
 
28418
- //# sourceMappingURL=plugin-C2Hp2Vs2.mjs.map
28421
+ //# sourceMappingURL=plugin-Xkr83G9A.mjs.map