@workos/oagen-emitters 0.6.8 → 0.7.1

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.6.8"
2
+ ".": "0.7.1"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.7.1](https://github.com/workos/oagen-emitters/compare/v0.7.0...v0.7.1) (2026-05-01)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **python:** use explicit re-export form in service __init__.py ([#70](https://github.com/workos/oagen-emitters/issues/70)) ([5fcbb83](https://github.com/workos/oagen-emitters/commit/5fcbb83cc2c87278df2b6f055ccdcaa6efb97ad4))
9
+
10
+ ## [0.7.0](https://github.com/workos/oagen-emitters/compare/v0.6.8...v0.7.0) (2026-04-30)
11
+
12
+
13
+ ### Features
14
+
15
+ * thread modelHints through assignModelsToServices call sites ([#68](https://github.com/workos/oagen-emitters/issues/68)) ([1ad5acd](https://github.com/workos/oagen-emitters/commit/1ad5acdda7eeb6a0f24bdd26c6144a76e82157f2))
16
+
3
17
  ## [0.6.8](https://github.com/workos/oagen-emitters/compare/v0.6.7...v0.6.8) (2026-04-30)
4
18
 
5
19
 
package/README.md CHANGED
@@ -15,6 +15,7 @@ const config: OagenConfig = {
15
15
  docUrl: "https://workos.com/docs",
16
16
  operationHints,
17
17
  mountRules,
18
+ modelHints,
18
19
  };
19
20
  ```
20
21
 
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as nodeEmitter, a as rustExtractor, c as pythonExtractor, d as rubyEmitter, f as kotlinEmitter, g as pythonEmitter, h as phpEmitter, i as kotlinExtractor, l as rubyExtractor, m as goEmitter, n as elixirExtractor, o as goExtractor, p as dotnetEmitter, r as dotnetExtractor, s as phpExtractor, t as workosEmittersPlugin, u as nodeExtractor } from "./plugin-Cmg_LFtm.mjs";
1
+ import { _ as nodeEmitter, a as rustExtractor, c as pythonExtractor, d as rubyEmitter, f as kotlinEmitter, g as pythonEmitter, h as phpEmitter, i as kotlinExtractor, l as rubyExtractor, m as goEmitter, n as elixirExtractor, o as goExtractor, p as dotnetEmitter, r as dotnetExtractor, s as phpExtractor, t as workosEmittersPlugin, u as nodeExtractor } from "./plugin-h8Onp2Ma.mjs";
2
2
  export { dotnetEmitter, dotnetExtractor, elixirExtractor, goEmitter, goExtractor, kotlinEmitter, kotlinExtractor, nodeEmitter, nodeExtractor, phpEmitter, phpExtractor, pythonEmitter, pythonExtractor, rubyEmitter, rubyExtractor, rustExtractor, workosEmittersPlugin };
@@ -3016,7 +3016,7 @@ function buildKnownTypeNames(models, ctx) {
3016
3016
  * the output directory for a given IR service name.
3017
3017
  */
3018
3018
  function createServiceDirResolver(models, services, ctx) {
3019
- const modelToService = assignModelsToServices(models, services);
3019
+ const modelToService = assignModelsToServices(models, services, ctx.modelHints);
3020
3020
  const serviceNameMap = buildServiceNameMap(services, ctx);
3021
3021
  const resolveDir = (irService) => irService ? resolveServiceDir$1(serviceNameMap.get(irService) ?? irService) : "common";
3022
3022
  return {
@@ -6532,7 +6532,7 @@ function modelNeedsRoundTripTest(model) {
6532
6532
  */
6533
6533
  function generateSerializerTests(spec, ctx) {
6534
6534
  const files = [];
6535
- const modelToService = assignModelsToServices$1(spec.models, spec.services);
6535
+ const modelToService = assignModelsToServices$1(spec.models, spec.services, ctx.modelHints);
6536
6536
  const serviceNameMap = /* @__PURE__ */ new Map();
6537
6537
  for (const service of spec.services) serviceNameMap.set(service.name, resolveResourceClassName$3(service, ctx));
6538
6538
  const resolveDir = (irService) => irService ? resolveServiceDir$1(serviceNameMap.get(irService) ?? irService) : "common";
@@ -7100,7 +7100,7 @@ function assignEnumsToServices(enums, services) {
7100
7100
  */
7101
7101
  function generateModels$5(models, ctx) {
7102
7102
  if (models.length === 0) return [];
7103
- const modelToService = assignModelsToServices(models, ctx.spec.services);
7103
+ const modelToService = assignModelsToServices(models, ctx.spec.services, ctx.modelHints);
7104
7104
  const enumToService = assignEnumsToServices(ctx.spec.enums, ctx.spec.services);
7105
7105
  const mountDirMap = buildMountDirMap$1(ctx);
7106
7106
  const resolveDir = (irService) => irService ? mountDirMap.get(irService) ?? "common" : "common";
@@ -8453,7 +8453,7 @@ function generateResources$5(services, ctx) {
8453
8453
  if (enumImports.size > 0) lines.push(`from ${importPrefix}_types import RequestOptions, enum_value`);
8454
8454
  else lines.push(`from ${importPrefix}_types import RequestOptions`);
8455
8455
  const actualModelImports = [...modelImports];
8456
- const modelToServiceMap = assignModelsToServices(ctx.spec.models, ctx.spec.services);
8456
+ const modelToServiceMap = assignModelsToServices(ctx.spec.models, ctx.spec.services, ctx.modelHints);
8457
8457
  for (const model of ctx.spec.models) if (model.discriminator) {
8458
8458
  const svc = modelToServiceMap.get(model.name);
8459
8459
  if (svc) modelToServiceMap.set(model.name + "Variant", svc);
@@ -8939,12 +8939,12 @@ function generateServiceInits(spec, ctx) {
8939
8939
  const lines = [];
8940
8940
  const mountTarget = getMountTarget(service, ctx);
8941
8941
  const groupClassNames = collectParameterGroupClassNames(mountGroups.get(mountTarget)?.operations ?? service.operations);
8942
- const resourceImports = [
8942
+ const aliasedImports = [
8943
8943
  resolvedName,
8944
8944
  `Async${resolvedName}`,
8945
8945
  ...groupClassNames
8946
- ];
8947
- lines.push(`from ._resource import ${resourceImports.join(", ")}`);
8946
+ ].map((n) => `${n} as ${n}`);
8947
+ lines.push(`from ._resource import ${aliasedImports.join(", ")}`);
8948
8948
  lines.push("from .models import *");
8949
8949
  files.push({
8950
8950
  path: `src/${ctx.namespace}/${dirName}/__init__.py`,
@@ -9270,7 +9270,7 @@ function generateServiceTest$2(service, spec, ctx, accessPaths, resolvedOps) {
9270
9270
  if (!model) return true;
9271
9271
  return !isListWrapperModel(model);
9272
9272
  });
9273
- const modelToServiceMap = assignModelsToServices(spec.models, spec.services);
9273
+ const modelToServiceMap = assignModelsToServices(spec.models, spec.services, ctx.modelHints);
9274
9274
  const mountDirMap = buildMountDirMap$1(ctx);
9275
9275
  const resolveModelDir = (modelName) => {
9276
9276
  const svc = modelToServiceMap.get(modelName);
@@ -10120,7 +10120,7 @@ function generateModelRoundTripTests(spec, ctx) {
10120
10120
  for (const name of responseModelNames) requestOnlyModelNames.delete(name);
10121
10121
  const models = spec.models.filter((m) => !isListWrapperModel(m) && !isListMetadataModel(m) && !requestOnlyModelNames.has(m.name));
10122
10122
  if (models.length === 0) return null;
10123
- const modelToService = assignModelsToServices(spec.models, spec.services);
10123
+ const modelToService = assignModelsToServices(spec.models, spec.services, ctx.modelHints);
10124
10124
  const roundTripDirMap = buildMountDirMap$1(ctx);
10125
10125
  const resolveDir = (irService) => irService ? roundTripDirMap.get(irService) ?? "common" : "common";
10126
10126
  const lines = [];
@@ -19778,7 +19778,7 @@ function generateModels(models, ctx) {
19778
19778
  if (models.length === 0) return [];
19779
19779
  const enumNames = new Set(ctx.spec.enums.map((e) => e.name));
19780
19780
  const modelNames = new Set(models.map((m) => m.name));
19781
- const modelToService = assignModelsToServices(models, ctx.spec.services);
19781
+ const modelToService = assignModelsToServices(models, ctx.spec.services, ctx.modelHints);
19782
19782
  const mountDirMap = buildMountDirMap(ctx);
19783
19783
  const dirFor = (modelName) => {
19784
19784
  const service = modelToService.get(modelName);
@@ -21146,7 +21146,7 @@ function generateMainEntryFile(spec, ctx) {
21146
21146
  * keep the generated namespace flat while the filesystem is grouped.
21147
21147
  */
21148
21148
  function collectModelSubdirs(spec, ctx) {
21149
- const modelToService = assignModelsToServices(spec.models, spec.services);
21149
+ const modelToService = assignModelsToServices(spec.models, spec.services, ctx.modelHints);
21150
21150
  const mountDirMap = buildMountDirMap(ctx);
21151
21151
  const subdirs = /* @__PURE__ */ new Set();
21152
21152
  for (const model of spec.models) {
@@ -21975,4 +21975,4 @@ const workosEmittersPlugin = {
21975
21975
  //#endregion
21976
21976
  export { nodeEmitter as _, rustExtractor as a, pythonExtractor as c, rubyEmitter as d, kotlinEmitter as f, pythonEmitter as g, phpEmitter as h, kotlinExtractor as i, rubyExtractor as l, goEmitter as m, elixirExtractor as n, goExtractor as o, dotnetEmitter as p, dotnetExtractor as r, phpExtractor as s, workosEmittersPlugin as t, nodeExtractor as u };
21977
21977
 
21978
- //# sourceMappingURL=plugin-Cmg_LFtm.mjs.map
21978
+ //# sourceMappingURL=plugin-h8Onp2Ma.mjs.map