@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.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +7 -0
- package/dist/index.mjs +1 -1
- package/dist/{plugin-C2Hp2Vs2.mjs → plugin-Xkr83G9A.mjs} +7 -4
- package/dist/plugin-Xkr83G9A.mjs.map +1 -0
- package/dist/plugin.mjs +1 -1
- package/package.json +1 -1
- package/src/node/resources.ts +7 -3
- package/dist/plugin-C2Hp2Vs2.mjs.map +0 -1
package/dist/plugin.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as workosEmittersPlugin } from "./plugin-
|
|
1
|
+
import { t as workosEmittersPlugin } from "./plugin-Xkr83G9A.mjs";
|
|
2
2
|
export { workosEmittersPlugin };
|
package/package.json
CHANGED
package/src/node/resources.ts
CHANGED
|
@@ -1673,10 +1673,13 @@ function renderOptionsObjectMethod(
|
|
|
1673
1673
|
(itemRawName ? resolveInterfaceName(itemRawName, ctx) : responseModel);
|
|
1674
1674
|
if (!itemType) return false;
|
|
1675
1675
|
const wireType = wireInterfaceName(itemType);
|
|
1676
|
-
const returnType =
|
|
1677
|
-
preferredBaselineReturnType(ctx, baselineMethod?.returnType) ?? `Promise<AutoPaginatable<${itemType}>>`;
|
|
1678
1676
|
const extraParams = op.queryParams.filter((p) => !PAGINATION_PARAM_NAMES.has(p.name));
|
|
1679
1677
|
const needsWireSerializer = extraParams.some((p) => fieldName(p.name) !== wireFieldName(p.name));
|
|
1678
|
+
const paginationType = needsWireSerializer ? 'PaginationOptions' : optionParam.type;
|
|
1679
|
+
const returnType = needsWireSerializer
|
|
1680
|
+
? `Promise<AutoPaginatable<${itemType}, ${paginationType}>>`
|
|
1681
|
+
: (preferredBaselineReturnType(ctx, baselineMethod?.returnType) ??
|
|
1682
|
+
`Promise<AutoPaginatable<${itemType}, ${paginationType}>>`);
|
|
1680
1683
|
const listOptionsExpr = needsWireSerializer
|
|
1681
1684
|
? `options ? serialize${optionParam.type}(options) : undefined`
|
|
1682
1685
|
: 'paginationOptions';
|
|
@@ -1887,7 +1890,8 @@ function renderPaginatedMethod(
|
|
|
1887
1890
|
const wireType = wireInterfaceName(itemType);
|
|
1888
1891
|
const serializeCall = serializerArg ? `options ? serialize${optionsType}(options) : undefined` : 'options';
|
|
1889
1892
|
|
|
1890
|
-
|
|
1893
|
+
const paginationType = needsWireSerializer ? 'PaginationOptions' : optionsType;
|
|
1894
|
+
lines.push(` async ${method}(${allParams}): Promise<AutoPaginatable<${itemType}, ${paginationType}>> {`);
|
|
1891
1895
|
lines.push(` return new AutoPaginatable(`);
|
|
1892
1896
|
lines.push(` await fetchAndDeserialize<${wireType}, ${itemType}>(`);
|
|
1893
1897
|
lines.push(` this.workos,`);
|