@polaris-auth/client 0.8.0 → 0.10.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.
- package/dist/agents.d.ts +9189 -0
- package/dist/agents.js +51 -0
- package/dist/api-keys.d.ts +2657 -0
- package/dist/api-keys.js +19 -0
- package/dist/index.d.ts +18 -2
- package/dist/index.js +13 -1
- package/dist/mcp.d.ts +456 -0
- package/dist/mcp.js +9 -0
- package/dist/oauth.d.ts +8556 -0
- package/dist/oauth.js +57 -0
- package/openapi.json +10913 -1
- package/package.json +16 -2
- package/src/agents.ts +58 -0
- package/src/api-keys.ts +26 -0
- package/src/index.ts +22 -2
- package/src/mcp.ts +16 -0
- package/src/oauth.ts +64 -0
- package/src/schema.d.ts +10537 -4370
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polaris-auth/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Typed TypeScript client for Polaris for PHP, generated from the route manifest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"polaris",
|
|
@@ -25,7 +25,21 @@
|
|
|
25
25
|
"client",
|
|
26
26
|
"passkey",
|
|
27
27
|
"webauthn",
|
|
28
|
-
"social-login"
|
|
28
|
+
"social-login",
|
|
29
|
+
"api-keys",
|
|
30
|
+
"oauth2",
|
|
31
|
+
"oauth2-server",
|
|
32
|
+
"oidc",
|
|
33
|
+
"openid-connect",
|
|
34
|
+
"pkce",
|
|
35
|
+
"dpop",
|
|
36
|
+
"device-flow",
|
|
37
|
+
"ciba",
|
|
38
|
+
"token-exchange",
|
|
39
|
+
"mcp",
|
|
40
|
+
"model-context-protocol",
|
|
41
|
+
"ai-agents",
|
|
42
|
+
"agent-auth"
|
|
29
43
|
],
|
|
30
44
|
"homepage": "https://github.com/univeros/polaris-core/tree/main/packages/client-ts#readme",
|
|
31
45
|
"bugs": "https://github.com/univeros/polaris-core/issues",
|
package/src/agents.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* Generated by scripts/generate-namespaces.mjs from openapi.json; do not edit. */
|
|
2
|
+
import type { Client } from "openapi-fetch";
|
|
3
|
+
import type { paths } from "./schema.js";
|
|
4
|
+
import type { Init } from "./namespace.js";
|
|
5
|
+
|
|
6
|
+
/** The `agents` plugin's routes as methods of `client.agents`. */
|
|
7
|
+
export function agents(client: Client<paths>) {
|
|
8
|
+
return {
|
|
9
|
+
/** GET /admin/agents: List every agent */
|
|
10
|
+
adminListAgents: (...init: Init<"/admin/agents", "get">) => client.GET("/admin/agents", ...init),
|
|
11
|
+
/** POST /admin/agents/{id}/revoke: Revoke an agent as an operator */
|
|
12
|
+
adminRevokeAgent: (...init: Init<"/admin/agents/{id}/revoke", "post">) => client.POST("/admin/agents/{id}/revoke", ...init),
|
|
13
|
+
/** GET /agents/capabilities: List the capabilities */
|
|
14
|
+
capabilities: (...init: Init<"/agents/capabilities", "get">) => client.GET("/agents/capabilities", ...init),
|
|
15
|
+
/** GET /.well-known/agent-configuration: Agent protocol discovery */
|
|
16
|
+
configuration: (...init: Init<"/.well-known/agent-configuration", "get">) => client.GET("/.well-known/agent-configuration", ...init),
|
|
17
|
+
/** POST /agents/hosts: Create a host */
|
|
18
|
+
createHost: (...init: Init<"/agents/hosts", "post">) => client.POST("/agents/hosts", ...init),
|
|
19
|
+
/** POST /agents/approvals/{id}/decide: Approve or deny a grant request */
|
|
20
|
+
decideApproval: (...init: Init<"/agents/approvals/{id}/decide", "post">) => client.POST("/agents/approvals/{id}/decide", ...init),
|
|
21
|
+
/** DELETE /agents/grants/{id}: Revoke a grant */
|
|
22
|
+
deleteGrant: (...init: Init<"/agents/grants/{id}", "delete">) => client.DELETE("/agents/grants/{id}", ...init),
|
|
23
|
+
/** DELETE /agents/hosts/{id}: Revoke a host */
|
|
24
|
+
deleteHost: (...init: Init<"/agents/hosts/{id}", "delete">) => client.DELETE("/agents/hosts/{id}", ...init),
|
|
25
|
+
/** POST /agents/enroll: Enrol an agent through a host */
|
|
26
|
+
enroll: (...init: Init<"/agents/enroll", "post">) => client.POST("/agents/enroll", ...init),
|
|
27
|
+
/** POST /agents/execute: Execute a capability */
|
|
28
|
+
execute: (...init: Init<"/agents/execute", "post">) => client.POST("/agents/execute", ...init),
|
|
29
|
+
/** GET /agents: List my agents */
|
|
30
|
+
listAgents: (...init: Init<"/agents", "get">) => client.GET("/agents", ...init),
|
|
31
|
+
/** GET /agents/approvals: List pending approvals */
|
|
32
|
+
listApprovals: (...init: Init<"/agents/approvals", "get">) => client.GET("/agents/approvals", ...init),
|
|
33
|
+
/** GET /agents/hosts: List my hosts */
|
|
34
|
+
listHosts: (...init: Init<"/agents/hosts", "get">) => client.GET("/agents/hosts", ...init),
|
|
35
|
+
/** GET /agents/{id}/receipts: List an agent's receipts */
|
|
36
|
+
listReceipts: (...init: Init<"/agents/{id}/receipts", "get">) => client.GET("/agents/{id}/receipts", ...init),
|
|
37
|
+
/** GET /agents/approvals/code: Read the approval behind a user code */
|
|
38
|
+
readApproval: (...init: Init<"/agents/approvals/code", "get">) => client.GET("/agents/approvals/code", ...init),
|
|
39
|
+
/** POST /agents/register: Register an agent */
|
|
40
|
+
register: (...init: Init<"/agents/register", "post">) => client.POST("/agents/register", ...init),
|
|
41
|
+
/** POST /agents/grants/request: Request capability grants */
|
|
42
|
+
requestGrants: (...init: Init<"/agents/grants/request", "post">) => client.POST("/agents/grants/request", ...init),
|
|
43
|
+
/** POST /agents/{id}/resume: Resume an agent */
|
|
44
|
+
resume: (...init: Init<"/agents/{id}/resume", "post">) => client.POST("/agents/{id}/resume", ...init),
|
|
45
|
+
/** POST /agents/{id}/revoke: Revoke an agent */
|
|
46
|
+
revoke: (...init: Init<"/agents/{id}/revoke", "post">) => client.POST("/agents/{id}/revoke", ...init),
|
|
47
|
+
/** GET /agents/session: The agent's session */
|
|
48
|
+
session: (...init: Init<"/agents/session", "get">) => client.GET("/agents/session", ...init),
|
|
49
|
+
/** GET /agents/{id}: Read an agent */
|
|
50
|
+
showAgent: (...init: Init<"/agents/{id}", "get">) => client.GET("/agents/{id}", ...init),
|
|
51
|
+
/** POST /agents/{id}/suspend: Suspend an agent */
|
|
52
|
+
suspend: (...init: Init<"/agents/{id}/suspend", "post">) => client.POST("/agents/{id}/suspend", ...init),
|
|
53
|
+
/** GET /agents/receipts/{id}/verify: Verify a receipt */
|
|
54
|
+
verifyReceipt: (...init: Init<"/agents/receipts/{id}/verify", "get">) => client.GET("/agents/receipts/{id}/verify", ...init),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type AgentsApi = ReturnType<typeof agents>;
|
package/src/api-keys.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* Generated by scripts/generate-namespaces.mjs from openapi.json; do not edit. */
|
|
2
|
+
import type { Client } from "openapi-fetch";
|
|
3
|
+
import type { paths } from "./schema.js";
|
|
4
|
+
import type { Init } from "./namespace.js";
|
|
5
|
+
|
|
6
|
+
/** The `api-keys` plugin's routes as methods of `client.apiKeys`. */
|
|
7
|
+
export function apiKeys(client: Client<paths>) {
|
|
8
|
+
return {
|
|
9
|
+
/** POST /api-keys: Create an API key */
|
|
10
|
+
create: (...init: Init<"/api-keys", "post">) => client.POST("/api-keys", ...init),
|
|
11
|
+
/** DELETE /api-keys/{id}: Revoke an API key */
|
|
12
|
+
delete: (...init: Init<"/api-keys/{id}", "delete">) => client.DELETE("/api-keys/{id}", ...init),
|
|
13
|
+
/** GET /api-keys: List API keys */
|
|
14
|
+
list: (...init: Init<"/api-keys", "get">) => client.GET("/api-keys", ...init),
|
|
15
|
+
/** GET /api-keys/{id}: Read an API key */
|
|
16
|
+
read: (...init: Init<"/api-keys/{id}", "get">) => client.GET("/api-keys/{id}", ...init),
|
|
17
|
+
/** POST /api-keys/{id}/rotate: Rotate an API key */
|
|
18
|
+
rotate: (...init: Init<"/api-keys/{id}/rotate", "post">) => client.POST("/api-keys/{id}/rotate", ...init),
|
|
19
|
+
/** PATCH /api-keys/{id}: Update an API key */
|
|
20
|
+
update: (...init: Init<"/api-keys/{id}", "patch">) => client.PATCH("/api-keys/{id}", ...init),
|
|
21
|
+
/** POST /api-keys/verify: Verify an API key */
|
|
22
|
+
verify: (...init: Init<"/api-keys/verify", "post">) => client.POST("/api-keys/verify", ...init),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type ApiKeysApi = ReturnType<typeof apiKeys>;
|
package/src/index.ts
CHANGED
|
@@ -9,6 +9,10 @@ import { passwordless, type PasswordlessApi } from "./passwordless.js";
|
|
|
9
9
|
import { sentinel, type SentinelApi } from "./sentinel.js";
|
|
10
10
|
import { scim, type ScimApi } from "./scim.js";
|
|
11
11
|
import { social, type SocialApi } from "./social.js";
|
|
12
|
+
import { apiKeys, type ApiKeysApi } from "./api-keys.js";
|
|
13
|
+
import { oauth, type OauthApi } from "./oauth.js";
|
|
14
|
+
import { mcp, type McpApi } from "./mcp.js";
|
|
15
|
+
import { agents, type AgentsApi } from "./agents.js";
|
|
12
16
|
import { sso, type SsoApi } from "./sso.js";
|
|
13
17
|
import { username, type UsernameApi } from "./username.js";
|
|
14
18
|
import type { components, paths } from "./schema.js";
|
|
@@ -24,6 +28,10 @@ export { passwordless, type PasswordlessApi } from "./passwordless.js";
|
|
|
24
28
|
export { sentinel, type SentinelApi } from "./sentinel.js";
|
|
25
29
|
export { scim, type ScimApi } from "./scim.js";
|
|
26
30
|
export { social, type SocialApi } from "./social.js";
|
|
31
|
+
export { apiKeys, type ApiKeysApi } from "./api-keys.js";
|
|
32
|
+
export { oauth, type OauthApi } from "./oauth.js";
|
|
33
|
+
export { mcp, type McpApi } from "./mcp.js";
|
|
34
|
+
export { agents, type AgentsApi } from "./agents.js";
|
|
27
35
|
export { sso, type SsoApi } from "./sso.js";
|
|
28
36
|
export { username, type UsernameApi } from "./username.js";
|
|
29
37
|
export { registerPasskey, signInWithPasskey, passkeyAssertion, passkeyAutofillAvailable, type SignInWithPasskeyOptions } from "./webauthn.js";
|
|
@@ -32,7 +40,7 @@ export { registerPasskey, signInWithPasskey, passkeyAssertion, passkeyAutofillAv
|
|
|
32
40
|
export type ErrorBody = components["schemas"]["Error"];
|
|
33
41
|
/** The `{ errors: [...] }` envelope of a core route's 422. */
|
|
34
42
|
export type ValidationErrorBody = components["schemas"]["ValidationError"];
|
|
35
|
-
/** The RFC 9457 problem document every non-2xx response of a plugin route (`audit`, `admin`, `sentinel`, `sso`, `scim`, `passwordless`, `username`, `anonymous`, `multi-session`, `social`, `passkey`) carries. */
|
|
43
|
+
/** The RFC 9457 problem document every non-2xx response of a plugin route (`audit`, `admin`, `sentinel`, `sso`, `scim`, `passwordless`, `username`, `anonymous`, `multi-session`, `social`, `passkey`, `api-keys`, `oauth`, `mcp`, `agents`) carries. */
|
|
36
44
|
export type ProblemBody = components["schemas"]["Problem"];
|
|
37
45
|
|
|
38
46
|
export interface PolarisClientOptions extends ClientOptions {
|
|
@@ -76,6 +84,14 @@ export interface PolarisClient extends Client<paths> {
|
|
|
76
84
|
readonly social: SocialApi;
|
|
77
85
|
/** The `polaris/passkey` routes (`registerOptions()`, `registerVerify()`, `authenticateOptions()`, `authenticateVerify()`, `list()`, `rename()`, `delete()`); `registerPasskey()` and `signInWithPasskey()` run the browser ceremonies. */
|
|
78
86
|
readonly passkey: PasskeyApi;
|
|
87
|
+
/** The `polaris/api-keys` routes: `client.apiKeys.list()`, `create()`, `read()`, `update()`, `delete()`, `rotate()`, `verify()`. A key goes in `Authorization: Bearer pk_...` like a session token. */
|
|
88
|
+
readonly apiKeys: ApiKeysApi;
|
|
89
|
+
/** The `polaris/oauth-provider` routes: `client.oauth.authorize()`, `decision()`, `token()`, `userinfo()`, `revoke()`, `introspect()`, `register()`, the device, CIBA, consent, client-management and discovery methods. */
|
|
90
|
+
readonly oauth: OauthApi;
|
|
91
|
+
/** The `polaris/mcp` routes: `client.mcp.mcp()` (one JSON-RPC message to `POST /mcp`) and `protectedResource()` (the RFC 9728 metadata). */
|
|
92
|
+
readonly mcp: McpApi;
|
|
93
|
+
/** The `polaris/agents` routes: the owner's (`register()`, `listAgents()`, `listApprovals()`, `decideApproval()`, `revoke()`, ...), the agent's (`requestGrants()`, `execute()`, `session()`; `@polaris-auth/agent` signs them) and `configuration()`. */
|
|
94
|
+
readonly agents: AgentsApi;
|
|
79
95
|
/** A new client on the same options bound to another token (null for anonymous); this one is unchanged. */
|
|
80
96
|
withToken(token: string | null): PolarisClient;
|
|
81
97
|
}
|
|
@@ -84,7 +100,7 @@ export interface PolarisClient extends Client<paths> {
|
|
|
84
100
|
* An `openapi-fetch` client typed by `paths` (generated from `polaris manifest --format=openapi`), so
|
|
85
101
|
* `client.POST("/auth/login", { body })` checks the body and types `data` and `error`; the plugins' routes
|
|
86
102
|
* are also methods of `client.audit`, `client.admin`, `client.sentinel`, `client.sso`, `client.scim`, `client.passwordless`,
|
|
87
|
-
* `client.username`, `client.anonymous`, `client.multiSession`, `client.social` and `client.
|
|
103
|
+
* `client.username`, `client.anonymous`, `client.multiSession`, `client.social`, `client.passkey`, `client.apiKeys`, `client.oauth`, `client.mcp` and `client.agents`; `challenge.captcha`
|
|
88
104
|
* answers a sentinel captcha challenge with one retry. No refresh loop and no storage: when to refresh
|
|
89
105
|
* and where to keep tokens is the application's policy.
|
|
90
106
|
*/
|
|
@@ -117,6 +133,10 @@ export function createClient(options: PolarisClientOptions): PolarisClient {
|
|
|
117
133
|
multiSession: multiSession(client),
|
|
118
134
|
social: social(client),
|
|
119
135
|
passkey: passkey(client),
|
|
136
|
+
apiKeys: apiKeys(client),
|
|
137
|
+
oauth: oauth(client),
|
|
138
|
+
mcp: mcp(client),
|
|
139
|
+
agents: agents(client),
|
|
120
140
|
withToken: (next: string | null) => createClient({ ...options, token: next }),
|
|
121
141
|
};
|
|
122
142
|
}
|
package/src/mcp.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* Generated by scripts/generate-namespaces.mjs from openapi.json; do not edit. */
|
|
2
|
+
import type { Client } from "openapi-fetch";
|
|
3
|
+
import type { paths } from "./schema.js";
|
|
4
|
+
import type { Init } from "./namespace.js";
|
|
5
|
+
|
|
6
|
+
/** The `mcp` plugin's routes as methods of `client.mcp`. */
|
|
7
|
+
export function mcp(client: Client<paths>) {
|
|
8
|
+
return {
|
|
9
|
+
/** POST /mcp: Serve an MCP message */
|
|
10
|
+
mcp: (...init: Init<"/mcp", "post">) => client.POST("/mcp", ...init),
|
|
11
|
+
/** GET /.well-known/oauth-protected-resource/mcp: Protected resource metadata of /mcp */
|
|
12
|
+
protectedResource: (...init: Init<"/.well-known/oauth-protected-resource/mcp", "get">) => client.GET("/.well-known/oauth-protected-resource/mcp", ...init),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type McpApi = ReturnType<typeof mcp>;
|
package/src/oauth.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* Generated by scripts/generate-namespaces.mjs from openapi.json; do not edit. */
|
|
2
|
+
import type { Client } from "openapi-fetch";
|
|
3
|
+
import type { paths } from "./schema.js";
|
|
4
|
+
import type { Init } from "./namespace.js";
|
|
5
|
+
|
|
6
|
+
/** The `oauth` plugin's routes as methods of `client.oauth`. */
|
|
7
|
+
export function oauth(client: Client<paths>) {
|
|
8
|
+
return {
|
|
9
|
+
/** POST /admin/oauth/clients: Register an OAuth client as an operator */
|
|
10
|
+
adminCreateClient: (...init: Init<"/admin/oauth/clients", "post">) => client.POST("/admin/oauth/clients", ...init),
|
|
11
|
+
/** DELETE /admin/oauth/clients/{id}: Delete an OAuth client as an operator */
|
|
12
|
+
adminDeleteClient: (...init: Init<"/admin/oauth/clients/{id}", "delete">) => client.DELETE("/admin/oauth/clients/{id}", ...init),
|
|
13
|
+
/** GET /admin/oauth/clients: List every OAuth client */
|
|
14
|
+
adminListClients: (...init: Init<"/admin/oauth/clients", "get">) => client.GET("/admin/oauth/clients", ...init),
|
|
15
|
+
/** GET /.well-known/oauth-authorization-server: Authorization server metadata */
|
|
16
|
+
authorizationServer: (...init: Init<"/.well-known/oauth-authorization-server", "get">) => client.GET("/.well-known/oauth-authorization-server", ...init),
|
|
17
|
+
/** GET /oauth2/authorize: Start an authorization (consent) request */
|
|
18
|
+
authorize: (...init: Init<"/oauth2/authorize", "get">) => client.GET("/oauth2/authorize", ...init),
|
|
19
|
+
/** POST /oauth2/ciba: Backchannel authentication request */
|
|
20
|
+
ciba: (...init: Init<"/oauth2/ciba", "post">) => client.POST("/oauth2/ciba", ...init),
|
|
21
|
+
/** POST /oauth2/ciba/{id}/decide: Approve or refuse a backchannel request */
|
|
22
|
+
cibaDecide: (...init: Init<"/oauth2/ciba/{id}/decide", "post">) => client.POST("/oauth2/ciba/{id}/decide", ...init),
|
|
23
|
+
/** GET /oauth2/ciba/pending: List pending backchannel requests */
|
|
24
|
+
cibaPending: (...init: Init<"/oauth2/ciba/pending", "get">) => client.GET("/oauth2/ciba/pending", ...init),
|
|
25
|
+
/** DELETE /oauth2/consents/{clientId}: Revoke a consent */
|
|
26
|
+
consentRevoke: (...init: Init<"/oauth2/consents/{clientId}", "delete">) => client.DELETE("/oauth2/consents/{clientId}", ...init),
|
|
27
|
+
/** GET /oauth2/consents: List your consents */
|
|
28
|
+
consentsList: (...init: Init<"/oauth2/consents", "get">) => client.GET("/oauth2/consents", ...init),
|
|
29
|
+
/** POST /orgs/{id}/oauth/clients: Register an OAuth client for the organization */
|
|
30
|
+
createClient: (...init: Init<"/orgs/{id}/oauth/clients", "post">) => client.POST("/orgs/{id}/oauth/clients", ...init),
|
|
31
|
+
/** POST /oauth2/authorize/decision: Approve or refuse an authorization request */
|
|
32
|
+
decision: (...init: Init<"/oauth2/authorize/decision", "post">) => client.POST("/oauth2/authorize/decision", ...init),
|
|
33
|
+
/** DELETE /orgs/{id}/oauth/clients/{clientId}: Delete an OAuth client of the organization */
|
|
34
|
+
deleteClient: (...init: Init<"/orgs/{id}/oauth/clients/{clientId}", "delete">) => client.DELETE("/orgs/{id}/oauth/clients/{clientId}", ...init),
|
|
35
|
+
/** POST /oauth2/device/approve: Approve or refuse a device */
|
|
36
|
+
deviceApprove: (...init: Init<"/oauth2/device/approve", "post">) => client.POST("/oauth2/device/approve", ...init),
|
|
37
|
+
/** POST /oauth2/device/code: Start the device flow */
|
|
38
|
+
deviceCode: (...init: Init<"/oauth2/device/code", "post">) => client.POST("/oauth2/device/code", ...init),
|
|
39
|
+
/** GET /oauth2/device/verify: Read the device behind a user code */
|
|
40
|
+
deviceVerify: (...init: Init<"/oauth2/device/verify", "get">) => client.GET("/oauth2/device/verify", ...init),
|
|
41
|
+
/** POST /oauth2/introspect: Introspect a token */
|
|
42
|
+
introspect: (...init: Init<"/oauth2/introspect", "post">) => client.POST("/oauth2/introspect", ...init),
|
|
43
|
+
/** GET /orgs/{id}/oauth/clients: List the organization's OAuth clients */
|
|
44
|
+
listClients: (...init: Init<"/orgs/{id}/oauth/clients", "get">) => client.GET("/orgs/{id}/oauth/clients", ...init),
|
|
45
|
+
/** GET /.well-known/openid-configuration: OpenID Connect Discovery */
|
|
46
|
+
openIdConfiguration: (...init: Init<"/.well-known/openid-configuration", "get">) => client.GET("/.well-known/openid-configuration", ...init),
|
|
47
|
+
/** GET /orgs/{id}/oauth/clients/{clientId}: Read an OAuth client of the organization */
|
|
48
|
+
readClient: (...init: Init<"/orgs/{id}/oauth/clients/{clientId}", "get">) => client.GET("/orgs/{id}/oauth/clients/{clientId}", ...init),
|
|
49
|
+
/** POST /oauth2/register: Register a client (RFC 7591) */
|
|
50
|
+
register: (...init: Init<"/oauth2/register", "post">) => client.POST("/oauth2/register", ...init),
|
|
51
|
+
/** POST /oauth2/revoke: Revoke a token */
|
|
52
|
+
revoke: (...init: Init<"/oauth2/revoke", "post">) => client.POST("/oauth2/revoke", ...init),
|
|
53
|
+
/** POST /oauth2/token: Issue tokens */
|
|
54
|
+
token: (...init: Init<"/oauth2/token", "post">) => client.POST("/oauth2/token", ...init),
|
|
55
|
+
/** PATCH /orgs/{id}/oauth/clients/{clientId}: Update an OAuth client of the organization */
|
|
56
|
+
updateClient: (...init: Init<"/orgs/{id}/oauth/clients/{clientId}", "patch">) => client.PATCH("/orgs/{id}/oauth/clients/{clientId}", ...init),
|
|
57
|
+
/** GET /oauth2/userinfo: The user's OpenID claims */
|
|
58
|
+
userinfo: (...init: Init<"/oauth2/userinfo", "get">) => client.GET("/oauth2/userinfo", ...init),
|
|
59
|
+
/** POST /oauth2/userinfo: The user's OpenID claims (POST) */
|
|
60
|
+
userinfoPost: (...init: Init<"/oauth2/userinfo", "post">) => client.POST("/oauth2/userinfo", ...init),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type OauthApi = ReturnType<typeof oauth>;
|