@workos/openapi-spec 0.44.0 → 0.46.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.
@@ -13838,6 +13838,20 @@ paths:
13838
13838
  required:
13839
13839
  - code
13840
13840
  - message
13841
+ - type: object
13842
+ properties:
13843
+ code:
13844
+ type: string
13845
+ description: The error code identifying the type of error.
13846
+ example: organization_blocked_from_sending_invites
13847
+ const: organization_blocked_from_sending_invites
13848
+ message:
13849
+ type: string
13850
+ description: A human-readable description of the error.
13851
+ example: Request could not be processed.
13852
+ required:
13853
+ - code
13854
+ - message
13841
13855
  '404':
13842
13856
  description: Not Found
13843
13857
  content:
@@ -21079,6 +21093,16 @@ components:
21079
21093
  - api_key
21080
21094
  example:
21081
21095
  - oauth
21096
+ config:
21097
+ type: object
21098
+ description: >-
21099
+ Provider-specific config values (e.g. a Snowflake
21100
+ `account_identifier`), keyed by the config field. Only fields the
21101
+ built-in provider declares are accepted.
21102
+ additionalProperties:
21103
+ type: string
21104
+ example:
21105
+ account_identifier: acme-prod
21082
21106
  credentials:
21083
21107
  description: >-
21084
21108
  The OAuth credentials to configure for the Data Integration.
@@ -35693,6 +35717,16 @@ components:
35693
35717
  - organization_id
35694
35718
  - api_key_last_4
35695
35719
  - type: 'null'
35720
+ config:
35721
+ type: object
35722
+ additionalProperties:
35723
+ type: string
35724
+ description: >-
35725
+ Provider-specific config values set on the Data Integration (e.g. a
35726
+ Snowflake `account_identifier`), keyed by config field. Only fields
35727
+ the provider declares are accepted.
35728
+ example:
35729
+ account_identifier: acme-prod
35696
35730
  custom_provider:
35697
35731
  description: >-
35698
35732
  The OAuth definition when this is a custom provider; `null` for
@@ -35800,6 +35834,7 @@ components:
35800
35834
  - auth_methods
35801
35835
  - credentials
35802
35836
  - installation
35837
+ - config
35803
35838
  - custom_provider
35804
35839
  - created_at
35805
35840
  - updated_at
package/dist/policy.mjs CHANGED
@@ -1,4 +1,3 @@
1
- import { toCamelCase } from "@workos/oagen";
2
1
  //#region src/policy/operation-hints.ts
3
2
  /**
4
3
  * Per-operation overrides for the operation resolver. Keyed by `"METHOD /path"`.
@@ -368,6 +367,81 @@ const modelHints = {
368
367
  UserApiKeyOwner: "UserManagementUsers"
369
368
  };
370
369
  //#endregion
370
+ //#region src/policy/naming.ts
371
+ /**
372
+ * Naming utilities inlined from `@workos/oagen` (`src/utils/naming.ts`), same
373
+ * as the types in `./types.ts`: the published `dist/policy.mjs` must have zero
374
+ * runtime imports from `@workos/oagen`, because a runtime dependency on oagen
375
+ * drags its native tree-sitter toolchain into every consumer's install (see
376
+ * workos/cli#202). Keep in sync with the upstream definitions.
377
+ */
378
+ /**
379
+ * Known compound tokens that the regex-based splitter over-splits.
380
+ * Each entry is [lowercase-word-sequence, canonical-form].
381
+ * Sorted longest-first so greedy matching works correctly.
382
+ */
383
+ const COMPOUND_WORDS = [[[
384
+ "m",
385
+ "2",
386
+ "m"
387
+ ], "M2M"], [["o", "auth"], "OAuth"]];
388
+ /**
389
+ * Recombine adjacent words that form a known compound token.
390
+ */
391
+ function recombineCompounds(words) {
392
+ const result = [];
393
+ let i = 0;
394
+ while (i < words.length) {
395
+ let matched = false;
396
+ for (const [pattern, canonical] of COMPOUND_WORDS) if (i + pattern.length <= words.length) {
397
+ if (pattern.every((p, j) => words[i + j].toLowerCase() === p)) {
398
+ result.push(canonical);
399
+ i += pattern.length;
400
+ matched = true;
401
+ break;
402
+ }
403
+ }
404
+ if (!matched) {
405
+ result.push(words[i]);
406
+ i++;
407
+ }
408
+ }
409
+ return result;
410
+ }
411
+ /**
412
+ * Split a string into words, handling:
413
+ * - camelCase / PascalCase boundaries
414
+ * - snake_case / kebab-case separators
415
+ * - Consecutive capitals (e.g., "HTTPClient" → ["HTTP", "Client"])
416
+ * - Numbers as word boundaries (e.g., "OAuth2Token" → ["OAuth", "2", "Token"])
417
+ * - Known compounds are recombined (e.g., "M2M" stays as one word)
418
+ */
419
+ function splitWords(s) {
420
+ if (!s) return [];
421
+ return recombineCompounds(s.replace(/[^a-zA-Z0-9_\-\s.]/g, "_").replace(/([a-z])([A-Z])/g, "$1\0$2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1\0$2").replace(/([a-zA-Z])(\d)/g, "$1\0$2").replace(/(\d)([a-zA-Z])/g, "$1\0$2").split(/[\0_\-\s.]+/).filter((w) => w.length > 0));
422
+ }
423
+ const ACRONYM_SET = /* @__PURE__ */ new Set([
424
+ "SSO",
425
+ "FGA",
426
+ "SAML",
427
+ "SCIM",
428
+ "JWT",
429
+ "HMAC",
430
+ "M2M"
431
+ ]);
432
+ function toCamelCase(s, acronyms) {
433
+ const merged = acronyms ? /* @__PURE__ */ new Set([...ACRONYM_SET, ...acronyms]) : ACRONYM_SET;
434
+ const words = splitWords(s);
435
+ if (words.length === 0) return "";
436
+ return words.map((w, i) => {
437
+ if (i === 0) return w.toLowerCase();
438
+ const upper = w.toUpperCase();
439
+ if (merged.has(upper)) return upper;
440
+ if (upper === "OAUTH") return "OAuth";
441
+ return w.charAt(0).toUpperCase() + w.slice(1).toLowerCase();
442
+ }).join("");
443
+ }
444
+ //#endregion
371
445
  //#region src/policy/transforms.ts
372
446
  /**
373
447
  * NestJS-style operationId transform. Strips "Controller" and extracts the
package/dist/types.d.ts CHANGED
@@ -4328,6 +4328,15 @@ export interface components {
4328
4328
  * ]
4329
4329
  */
4330
4330
  auth_methods?: ("oauth" | "api_key")[];
4331
+ /**
4332
+ * @description Provider-specific config values (e.g. a Snowflake `account_identifier`), keyed by the config field. Only fields the built-in provider declares are accepted.
4333
+ * @example {
4334
+ * "account_identifier": "acme-prod"
4335
+ * }
4336
+ */
4337
+ config?: {
4338
+ [key: string]: string;
4339
+ };
4331
4340
  /** @description The OAuth credentials to configure for the Data Integration. Required for OAuth integrations; omit when `auth_methods` is `["api_key"]`. */
4332
4341
  credentials?: components["schemas"]["DataIntegrationCredentialsDto"];
4333
4342
  /** @description An optional API key to install for the first tenant on an `api_key` integration. Omit to declare a keyless integration; tenants can be added later via the per-installation API key path. */
@@ -15353,6 +15362,15 @@ export interface components {
15353
15362
  */
15354
15363
  api_key_last_4: string | null;
15355
15364
  } | null;
15365
+ /**
15366
+ * @description Provider-specific config values set on the Data Integration (e.g. a Snowflake `account_identifier`), keyed by config field. Only fields the provider declares are accepted.
15367
+ * @example {
15368
+ * "account_identifier": "acme-prod"
15369
+ * }
15370
+ */
15371
+ config: {
15372
+ [key: string]: string;
15373
+ };
15356
15374
  /** @description The OAuth definition when this is a custom provider; `null` for built-in providers. */
15357
15375
  custom_provider: {
15358
15376
  /**
@@ -29090,6 +29108,18 @@ export interface operations {
29090
29108
  * @example Request could not be processed.
29091
29109
  */
29092
29110
  message: string;
29111
+ } | {
29112
+ /**
29113
+ * @description The error code identifying the type of error.
29114
+ * @example organization_blocked_from_sending_invites
29115
+ * @constant
29116
+ */
29117
+ code: "organization_blocked_from_sending_invites";
29118
+ /**
29119
+ * @description A human-readable description of the error.
29120
+ * @example Request could not be processed.
29121
+ */
29122
+ message: string;
29093
29123
  };
29094
29124
  };
29095
29125
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workos/openapi-spec",
3
- "version": "0.44.0",
3
+ "version": "0.46.0",
4
4
  "type": "module",
5
5
  "description": "WorkOS OpenAPI specification, TypeScript types, and SDK resolution policy",
6
6
  "license": "MIT",
@@ -29,9 +29,6 @@
29
29
  "./operation-overrides/node": "./dist/operationOverrides.node.json",
30
30
  "./package.json": "./package.json"
31
31
  },
32
- "dependencies": {
33
- "@workos/oagen": "^0.26.1"
34
- },
35
32
  "scripts": {
36
33
  "generate:services": "node scripts/generate-services.mjs",
37
34
  "build:policy": "npm run generate:services && tsdown",
@@ -61,13 +58,14 @@
61
58
  "devDependencies": {
62
59
  "@types/js-yaml": "^4.0.9",
63
60
  "@types/node": "^26.1.1",
64
- "@workos/oagen-emitters": "^0.20.1",
61
+ "@workos/oagen": "^0.27.0",
62
+ "@workos/oagen-emitters": "^0.21.0",
65
63
  "diff2html": "^3.4.56",
66
64
  "husky": "^9.1.7",
67
65
  "js-yaml": "^4.1.1",
68
- "openapi-to-postmanv2": "^6.2.0",
69
- "tsdown": "^0.22.3",
70
- "tsx": "^4.23.0",
71
- "typescript": "^6.0.3"
66
+ "openapi-to-postmanv2": "^6.3.1",
67
+ "tsdown": "^0.22.13",
68
+ "tsx": "^4.23.1",
69
+ "typescript": "^7.0.2"
72
70
  }
73
71
  }