@workos/openapi-spec 0.22.0 → 0.23.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.
@@ -13,36 +13,56 @@ paths:
13
13
  content:
14
14
  application/json:
15
15
  schema:
16
- type: object
17
- properties:
18
- type:
19
- type: string
20
- enum:
21
- - api_key
22
- - access_token
23
- description: >-
24
- The kind of credential being validated — an agent API key or
25
- an agent access token.
26
- example: access_token
27
- credential:
28
- type: string
29
- minLength: 1
30
- description: >-
31
- The credential value to validate: the API key value for
32
- `api_key`, or the access token (JWT) for `access_token`.
33
- example: sk_agent_example_1234567890
34
- audience:
35
- type: string
36
- minLength: 1
37
- description: >-
38
- Only applies to `access_token` credentials. When provided,
39
- the access token's `aud` claim is verified against this
40
- value — tokens issued for a different resource are rejected.
41
- Not permitted for `api_key` credentials.
42
- example: https://api.example.com
43
- required:
44
- - type
45
- - credential
16
+ discriminator:
17
+ propertyName: type
18
+ oneOf:
19
+ - type: object
20
+ properties:
21
+ type:
22
+ type: string
23
+ description: >-
24
+ The kind of credential being validated — an agent API
25
+ key or an agent access token.
26
+ const: api_key
27
+ credential:
28
+ type: string
29
+ minLength: 1
30
+ description: >-
31
+ The credential value to validate: the API key value for
32
+ `api_key`, or the access token (JWT) for `access_token`.
33
+ example: sk_agent_example_1234567890
34
+ required:
35
+ - type
36
+ - credential
37
+ - type: object
38
+ properties:
39
+ type:
40
+ type: string
41
+ description: >-
42
+ The kind of credential being validated — an agent API
43
+ key or an agent access token.
44
+ const: access_token
45
+ credential:
46
+ type: string
47
+ minLength: 1
48
+ description: >-
49
+ The credential value to validate: the API key value for
50
+ `api_key`, or the access token (JWT) for `access_token`.
51
+ example: eyJhbGciOiJSUzI1NiIsImtpZCI6...
52
+ audience:
53
+ type: string
54
+ minLength: 1
55
+ description: >-
56
+ When provided, the access token's `aud` claim is
57
+ verified against this value. Tokens issued for a
58
+ different resource are rejected.
59
+ example: https://api.example.com
60
+ required:
61
+ - type
62
+ - credential
63
+ description: >-
64
+ The agent credential to validate. Either an `api_key` or an
65
+ `access_token`, discriminated by `type`.
46
66
  responses:
47
67
  '200':
48
68
  description: OK
package/dist/types.d.ts CHANGED
@@ -16532,17 +16532,27 @@ export interface operations {
16532
16532
  "application/json": {
16533
16533
  /**
16534
16534
  * @description The kind of credential being validated — an agent API key or an agent access token.
16535
- * @example access_token
16536
- * @enum {string}
16535
+ * @constant
16537
16536
  */
16538
- type: "api_key" | "access_token";
16537
+ type: "api_key";
16539
16538
  /**
16540
16539
  * @description The credential value to validate: the API key value for `api_key`, or the access token (JWT) for `access_token`.
16541
16540
  * @example sk_agent_example_1234567890
16542
16541
  */
16543
16542
  credential: string;
16543
+ } | {
16544
+ /**
16545
+ * @description The kind of credential being validated — an agent API key or an agent access token.
16546
+ * @constant
16547
+ */
16548
+ type: "access_token";
16549
+ /**
16550
+ * @description The credential value to validate: the API key value for `api_key`, or the access token (JWT) for `access_token`.
16551
+ * @example eyJhbGciOiJSUzI1NiIsImtpZCI6...
16552
+ */
16553
+ credential: string;
16544
16554
  /**
16545
- * @description Only applies to `access_token` credentials. When provided, the access token's `aud` claim is verified against this value — tokens issued for a different resource are rejected. Not permitted for `api_key` credentials.
16555
+ * @description When provided, the access token's `aud` claim is verified against this value. Tokens issued for a different resource are rejected.
16546
16556
  * @example https://api.example.com
16547
16557
  */
16548
16558
  audience?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workos/openapi-spec",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "type": "module",
5
5
  "description": "WorkOS OpenAPI specification, TypeScript types, and SDK resolution policy",
6
6
  "license": "MIT",