@workos/openapi-spec 0.14.0 → 0.15.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.
Files changed (2) hide show
  1. package/dist/policy.mjs +15 -0
  2. package/package.json +3 -3
package/dist/policy.mjs CHANGED
@@ -434,6 +434,21 @@ function transformSpec(spec) {
434
434
  const listMetadata = groupRoleList?.properties?.list_metadata;
435
435
  if (listMetadata && !listMetadata.$ref && listMetadata.properties) groupRoleList.properties.list_metadata = { $ref: "#/components/schemas/ListMetadata" };
436
436
  }
437
+ if (schemas["OrganizationDomainStandAlone"] && !schemas["OrganizationDomain"]) {
438
+ schemas["OrganizationDomain"] = schemas["OrganizationDomainStandAlone"];
439
+ delete schemas["OrganizationDomainStandAlone"];
440
+ const oldRef = "#/components/schemas/OrganizationDomainStandAlone";
441
+ const newRef = "#/components/schemas/OrganizationDomain";
442
+ for (const pathItem of Object.values(paths)) for (const op of Object.values(pathItem)) {
443
+ const responses = op.responses;
444
+ for (const response of Object.values(responses ?? {})) {
445
+ const schema = response.content?.["application/json"]?.schema;
446
+ if (schema?.$ref === oldRef) schema.$ref = newRef;
447
+ }
448
+ }
449
+ const createJson = paths["/organization_domains"]?.post?.responses?.["201"]?.content?.["application/json"];
450
+ if (createJson && !createJson.schema?.$ref) createJson.schema = { $ref: newRef };
451
+ }
437
452
  return spec;
438
453
  }
439
454
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workos/openapi-spec",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "type": "module",
5
5
  "description": "WorkOS OpenAPI specification, TypeScript types, and SDK resolution policy",
6
6
  "license": "MIT",
@@ -60,8 +60,8 @@
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/js-yaml": "^4.0.9",
63
- "@types/node": "^26.0.0",
64
- "@workos/oagen-emitters": "^0.19.0",
63
+ "@types/node": "^26.0.1",
64
+ "@workos/oagen-emitters": "^0.19.1",
65
65
  "diff2html": "^3.4.56",
66
66
  "husky": "^9.1.7",
67
67
  "js-yaml": "^4.1.1",