@workos/oagen 0.26.0 → 0.27.0

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.
@@ -475,6 +475,14 @@ function extractInlineModelsFromProperties(schema, results, parentName) {
475
475
  extractInlineModelsFromProperties(items, results, modelName);
476
476
  }
477
477
  }
478
+ if (fieldSchema.allOf && fieldSchema.allOf.every((s) => !s.$ref && !s.oneOf && !s.anyOf)) {
479
+ const merged = mergeAllOfObjectSchema(fieldSchema);
480
+ if (Object.keys(merged.properties ?? {}).length > 0) {
481
+ const modelName = qualifyInlineModelName(toPascalCase(fieldName), parentName);
482
+ results.push(buildInlineModel(modelName, merged));
483
+ extractInlineModelsFromProperties(merged, results, modelName);
484
+ }
485
+ }
478
486
  if (fieldSchema.oneOf) {
479
487
  const inlineObjectVariants = fieldSchema.oneOf.filter((v) => !v.$ref && v.properties && (v.type === "object" || !v.type));
480
488
  if (inlineObjectVariants.length > 0) {
@@ -534,6 +542,31 @@ function nameOneOfVariant(variant, parentName, alreadyEmitted, discriminatorProp
534
542
  }
535
543
  return `${parentName}${alreadyEmitted.length + 1}`;
536
544
  }
545
+ /**
546
+ * Merge the object members of an `allOf` (recursively) into a single
547
+ * object-shaped schema, so an inline object expressed via `allOf` can be
548
+ * materialized as one model — mirroring how schemaToTypeRef collapses such a
549
+ * field into a single merged model ref. Earlier members win on key conflicts,
550
+ * matching the merge order used elsewhere in the parser.
551
+ */
552
+ function mergeAllOfObjectSchema(schema) {
553
+ const properties = {};
554
+ const required = [];
555
+ const visit = (s) => {
556
+ if (s.properties) {
557
+ for (const [key, value] of Object.entries(s.properties)) if (value && !(key in properties)) properties[key] = value;
558
+ }
559
+ if (s.required) required.push(...s.required);
560
+ if (s.allOf) for (const sub of s.allOf) visit(sub);
561
+ };
562
+ visit(schema);
563
+ return {
564
+ type: "object",
565
+ properties,
566
+ required,
567
+ description: schema.description
568
+ };
569
+ }
537
570
  function buildInlineModel(name, schema) {
538
571
  const requiredSet = new Set(schema.required ?? []);
539
572
  const fields = [];
@@ -2417,6 +2450,7 @@ function extractRequestBody(body, op, inlineModels) {
2417
2450
  description: void 0,
2418
2451
  fields
2419
2452
  });
2453
+ extractInlineModelsFromProperties(schema, inlineModels, contextName);
2420
2454
  return {
2421
2455
  body: {
2422
2456
  kind: "model",
@@ -2443,6 +2477,7 @@ function extractRequestBody(body, op, inlineModels) {
2443
2477
  description: variant.description,
2444
2478
  fields
2445
2479
  });
2480
+ extractInlineModelsFromProperties(variant, inlineModels, variantName);
2446
2481
  variants.push({
2447
2482
  kind: "model",
2448
2483
  name: variantName
@@ -7855,6 +7890,14 @@ const LANGUAGE_DEFAULTS = {
7855
7890
  overloadsArePublicApi: false,
7856
7891
  arityIsPublicApi: true
7857
7892
  },
7893
+ ios: {
7894
+ callerUsesParamNames: true,
7895
+ constructorOrderMatters: true,
7896
+ methodParameterNamesArePublicApi: true,
7897
+ constructorParameterNamesArePublicApi: true,
7898
+ overloadsArePublicApi: true,
7899
+ arityIsPublicApi: false
7900
+ },
7858
7901
  node: {
7859
7902
  callerUsesParamNames: false,
7860
7903
  constructorOrderMatters: false,
@@ -7931,6 +7974,7 @@ function apiSurfaceToSnapshot(surface) {
7931
7974
  sourceKind: "generated_service_wrapper",
7932
7975
  parameters: method.params.map((p, i) => apiParamToCompatParam(p, i, language)),
7933
7976
  returns: { name: method.returnType },
7977
+ ...method.isStatic !== void 0 ? { isStatic: method.isStatic } : {},
7934
7978
  ...cls.sourceFile ? { sourceFile: cls.sourceFile } : {}
7935
7979
  });
7936
7980
  }
@@ -8223,7 +8267,8 @@ const BREAKING_CATEGORIES = new Set([
8223
8267
  "union_wrapper_migration_without_compat_alias",
8224
8268
  "field_type_changed",
8225
8269
  "return_type_changed",
8226
- "enum_member_value_changed"
8270
+ "enum_member_value_changed",
8271
+ "staticness_changed"
8227
8272
  ]);
8228
8273
  const SOFT_RISK_CATEGORIES = new Set([
8229
8274
  "parameter_added_non_terminal_optional",
@@ -8284,6 +8329,15 @@ function classifySymbolChanges(baseline, candidate, policy) {
8284
8329
  policy,
8285
8330
  specRef
8286
8331
  }));
8332
+ if (baseline.isStatic !== void 0 && candidate.isStatic !== void 0 && baseline.isStatic !== candidate.isStatic) changes.push(makeChange({
8333
+ category: "staticness_changed",
8334
+ symbol: baseline.fqName,
8335
+ old: { static: String(baseline.isStatic) },
8336
+ new: { static: String(candidate.isStatic) },
8337
+ message: `"${baseline.displayName}" changed from ${baseline.isStatic ? "static" : "instance"} to ${candidate.isStatic ? "static" : "instance"} — call sites must migrate`,
8338
+ policy,
8339
+ specRef
8340
+ }));
8287
8341
  if (baseline.typeRef && candidate.typeRef && baseline.typeRef.name !== candidate.typeRef.name) changes.push(makeChange({
8288
8342
  category: "field_type_changed",
8289
8343
  symbol: baseline.fqName,