@runloop/reflex-client 0.15.1 → 0.16.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/generated/agent-groups.d.ts +1 -1
- package/dist/generated/agent-groups.js +1 -1
- package/dist/generated/agents.d.ts +15 -1
- package/dist/generated/agents.d.ts.map +1 -1
- package/dist/generated/agents.js +16 -0
- package/dist/generated/agents.js.map +1 -1
- package/dist/generated/auth.d.ts +16 -2
- package/dist/generated/auth.d.ts.map +1 -1
- package/dist/generated/auth.js +17 -1
- package/dist/generated/auth.js.map +1 -1
- package/dist/generated/model/acknowledgeDeviceAuthTokenBody.d.ts +11 -0
- package/dist/generated/model/acknowledgeDeviceAuthTokenBody.d.ts.map +1 -0
- package/dist/generated/model/acknowledgeDeviceAuthTokenBody.js +8 -0
- package/dist/generated/model/acknowledgeDeviceAuthTokenBody.js.map +1 -0
- package/dist/generated/model/attachAgentMcpServers200.d.ts +13 -0
- package/dist/generated/model/attachAgentMcpServers200.d.ts.map +1 -0
- package/dist/generated/model/attachAgentMcpServers200.js +2 -0
- package/dist/generated/model/attachAgentMcpServers200.js.map +1 -0
- package/dist/generated/model/attachAgentMcpServers200Activation.d.ts +14 -0
- package/dist/generated/model/attachAgentMcpServers200Activation.d.ts.map +1 -0
- package/dist/generated/model/attachAgentMcpServers200Activation.js +8 -0
- package/dist/generated/model/attachAgentMcpServers200Activation.js.map +1 -0
- package/dist/generated/model/attachAgentMcpServersBody.d.ts +14 -0
- package/dist/generated/model/attachAgentMcpServersBody.d.ts.map +1 -0
- package/dist/generated/model/attachAgentMcpServersBody.js +8 -0
- package/dist/generated/model/attachAgentMcpServersBody.js.map +1 -0
- package/dist/generated/model/availableSecretCategory.d.ts +0 -1
- package/dist/generated/model/availableSecretCategory.d.ts.map +1 -1
- package/dist/generated/model/availableSecretCategory.js +0 -1
- package/dist/generated/model/availableSecretCategory.js.map +1 -1
- package/dist/generated/model/createOrganizationInviteResponse.d.ts +14 -0
- package/dist/generated/model/createOrganizationInviteResponse.d.ts.map +1 -0
- package/dist/generated/model/createOrganizationInviteResponse.js +2 -0
- package/dist/generated/model/createOrganizationInviteResponse.js.map +1 -0
- package/dist/generated/model/index.d.ts +8 -0
- package/dist/generated/model/index.d.ts.map +1 -1
- package/dist/generated/model/index.js +8 -0
- package/dist/generated/model/index.js.map +1 -1
- package/dist/generated/model/listAgentsParams.d.ts +4 -0
- package/dist/generated/model/listAgentsParams.d.ts.map +1 -1
- package/dist/generated/model/listOrgInvitesParams.d.ts +2 -1
- package/dist/generated/model/listOrgInvitesParams.d.ts.map +1 -1
- package/dist/generated/model/listOrgInvitesParams.js +0 -6
- package/dist/generated/model/listOrgInvitesParams.js.map +1 -1
- package/dist/generated/model/listOrgInvitesStatus.d.ts +16 -0
- package/dist/generated/model/listOrgInvitesStatus.d.ts.map +1 -0
- package/dist/generated/model/listOrgInvitesStatus.js +15 -0
- package/dist/generated/model/listOrgInvitesStatus.js.map +1 -0
- package/dist/generated/model/organizationInvite.d.ts +27 -0
- package/dist/generated/model/organizationInvite.d.ts.map +1 -0
- package/dist/generated/model/organizationInvite.js +2 -0
- package/dist/generated/model/organizationInvite.js.map +1 -0
- package/dist/generated/model/organizationInviteStatus.d.ts +15 -0
- package/dist/generated/model/organizationInviteStatus.d.ts.map +1 -0
- package/dist/generated/model/organizationInviteStatus.js +14 -0
- package/dist/generated/model/organizationInviteStatus.js.map +1 -0
- package/dist/generated/model/startDeviceAuth201.d.ts +1 -0
- package/dist/generated/model/startDeviceAuth201.d.ts.map +1 -1
- package/dist/generated/model/startDeviceAuthBody.d.ts +1 -0
- package/dist/generated/model/startDeviceAuthBody.d.ts.map +1 -1
- package/dist/generated/organizations.d.ts +6 -6
- package/dist/generated/organizations.d.ts.map +1 -1
- package/dist/generated/organizations.js.map +1 -1
- package/dist/react/agent-groups.d.ts +2 -2
- package/dist/react/agent-groups.js +2 -2
- package/dist/react/agents.d.ts +33 -0
- package/dist/react/agents.d.ts.map +1 -1
- package/dist/react/agents.js +29 -0
- package/dist/react/agents.js.map +1 -1
- package/dist/react/auth.d.ts +29 -1
- package/dist/react/auth.d.ts.map +1 -1
- package/dist/react/auth.js +30 -1
- package/dist/react/auth.js.map +1 -1
- package/dist/react/model/acknowledgeDeviceAuthTokenBody.d.ts +11 -0
- package/dist/react/model/acknowledgeDeviceAuthTokenBody.d.ts.map +1 -0
- package/dist/react/model/acknowledgeDeviceAuthTokenBody.js +8 -0
- package/dist/react/model/acknowledgeDeviceAuthTokenBody.js.map +1 -0
- package/dist/react/model/attachAgentMcpServers200.d.ts +13 -0
- package/dist/react/model/attachAgentMcpServers200.d.ts.map +1 -0
- package/dist/react/model/attachAgentMcpServers200.js +2 -0
- package/dist/react/model/attachAgentMcpServers200.js.map +1 -0
- package/dist/react/model/attachAgentMcpServers200Activation.d.ts +14 -0
- package/dist/react/model/attachAgentMcpServers200Activation.d.ts.map +1 -0
- package/dist/react/model/attachAgentMcpServers200Activation.js +8 -0
- package/dist/react/model/attachAgentMcpServers200Activation.js.map +1 -0
- package/dist/react/model/attachAgentMcpServersBody.d.ts +14 -0
- package/dist/react/model/attachAgentMcpServersBody.d.ts.map +1 -0
- package/dist/react/model/attachAgentMcpServersBody.js +8 -0
- package/dist/react/model/attachAgentMcpServersBody.js.map +1 -0
- package/dist/react/model/availableSecretCategory.d.ts +0 -1
- package/dist/react/model/availableSecretCategory.d.ts.map +1 -1
- package/dist/react/model/availableSecretCategory.js +0 -1
- package/dist/react/model/availableSecretCategory.js.map +1 -1
- package/dist/react/model/createOrganizationInviteResponse.d.ts +14 -0
- package/dist/react/model/createOrganizationInviteResponse.d.ts.map +1 -0
- package/dist/react/model/createOrganizationInviteResponse.js +2 -0
- package/dist/react/model/createOrganizationInviteResponse.js.map +1 -0
- package/dist/react/model/listAgentsParams.d.ts +4 -0
- package/dist/react/model/listAgentsParams.d.ts.map +1 -1
- package/dist/react/model/listOrgInvitesParams.d.ts +2 -1
- package/dist/react/model/listOrgInvitesParams.d.ts.map +1 -1
- package/dist/react/model/listOrgInvitesParams.js +0 -6
- package/dist/react/model/listOrgInvitesParams.js.map +1 -1
- package/dist/react/model/listOrgInvitesStatus.d.ts +16 -0
- package/dist/react/model/listOrgInvitesStatus.d.ts.map +1 -0
- package/dist/react/model/listOrgInvitesStatus.js +15 -0
- package/dist/react/model/listOrgInvitesStatus.js.map +1 -0
- package/dist/react/model/organizationInvite.d.ts +27 -0
- package/dist/react/model/organizationInvite.d.ts.map +1 -0
- package/dist/react/model/organizationInvite.js +2 -0
- package/dist/react/model/organizationInvite.js.map +1 -0
- package/dist/react/model/organizationInviteStatus.d.ts +15 -0
- package/dist/react/model/organizationInviteStatus.d.ts.map +1 -0
- package/dist/react/model/organizationInviteStatus.js +14 -0
- package/dist/react/model/organizationInviteStatus.js.map +1 -0
- package/dist/react/model/startDeviceAuth201.d.ts +1 -0
- package/dist/react/model/startDeviceAuth201.d.ts.map +1 -1
- package/dist/react/model/startDeviceAuthBody.d.ts +1 -0
- package/dist/react/model/startDeviceAuthBody.d.ts.map +1 -1
- package/dist/react/organizations.d.ts +3 -2
- package/dist/react/organizations.d.ts.map +1 -1
- package/dist/react/organizations.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/agent-groups.ts +1 -1
- package/src/generated/agents.ts +39 -0
- package/src/generated/auth.ts +38 -1
- package/src/generated/model/acknowledgeDeviceAuthTokenBody.ts +11 -0
- package/src/generated/model/attachAgentMcpServers200.ts +13 -0
- package/src/generated/model/attachAgentMcpServers200Activation.ts +14 -0
- package/src/generated/model/attachAgentMcpServersBody.ts +14 -0
- package/src/generated/model/availableSecretCategory.ts +0 -1
- package/src/generated/model/createOrganizationInviteResponse.ts +14 -0
- package/src/generated/model/index.ts +8 -0
- package/src/generated/model/listAgentsParams.ts +4 -0
- package/src/generated/model/listOrgInvitesParams.ts +2 -1
- package/src/generated/model/listOrgInvitesStatus.ts +18 -0
- package/src/generated/model/organizationInvite.ts +27 -0
- package/src/generated/model/organizationInviteStatus.ts +17 -0
- package/src/generated/model/startDeviceAuth201.ts +1 -0
- package/src/generated/model/startDeviceAuthBody.ts +1 -0
- package/src/generated/organizations.ts +6 -5
- package/src/react/agent-groups.ts +2 -2
- package/src/react/agents.ts +73 -0
- package/src/react/auth.ts +69 -1
- package/src/react/model/acknowledgeDeviceAuthTokenBody.ts +11 -0
- package/src/react/model/attachAgentMcpServers200.ts +13 -0
- package/src/react/model/attachAgentMcpServers200Activation.ts +14 -0
- package/src/react/model/attachAgentMcpServersBody.ts +14 -0
- package/src/react/model/availableSecretCategory.ts +0 -1
- package/src/react/model/createOrganizationInviteResponse.ts +14 -0
- package/src/react/model/listAgentsParams.ts +4 -0
- package/src/react/model/listOrgInvitesParams.ts +2 -1
- package/src/react/model/listOrgInvitesStatus.ts +18 -0
- package/src/react/model/organizationInvite.ts +27 -0
- package/src/react/model/organizationInviteStatus.ts +17 -0
- package/src/react/model/startDeviceAuth201.ts +1 -0
- package/src/react/model/startDeviceAuthBody.ts +1 -0
- package/src/react/organizations.ts +6 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.18.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Reflex API
|
|
5
|
+
* OpenAPI spec version: 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type OrganizationInviteStatus = typeof OrganizationInviteStatus[keyof typeof OrganizationInviteStatus];
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export const OrganizationInviteStatus = {
|
|
12
|
+
pending: 'pending',
|
|
13
|
+
consumed: 'consumed',
|
|
14
|
+
revoked: 'revoked',
|
|
15
|
+
expired: 'expired',
|
|
16
|
+
declined: 'declined',
|
|
17
|
+
} as const;
|
|
@@ -16,6 +16,7 @@ import type {
|
|
|
16
16
|
CreateOrgModelProviderSecretBody,
|
|
17
17
|
CreateOrgTeamBody,
|
|
18
18
|
CreateOrganizationBody,
|
|
19
|
+
CreateOrganizationInviteResponse,
|
|
19
20
|
CreateTeamModelProviderSecretBody,
|
|
20
21
|
CreateTeamSecretBody,
|
|
21
22
|
GetIdpConfig200,
|
|
@@ -484,12 +485,12 @@ export const listOrgInvites = async (id: string,
|
|
|
484
485
|
);}
|
|
485
486
|
|
|
486
487
|
|
|
487
|
-
export type
|
|
488
|
-
data:
|
|
489
|
-
status:
|
|
488
|
+
export type createOrgInviteResponse201 = {
|
|
489
|
+
data: CreateOrganizationInviteResponse
|
|
490
|
+
status: 201
|
|
490
491
|
}
|
|
491
492
|
|
|
492
|
-
export type createOrgInviteResponseSuccess = (
|
|
493
|
+
export type createOrgInviteResponseSuccess = (createOrgInviteResponse201) & {
|
|
493
494
|
headers: Headers;
|
|
494
495
|
};
|
|
495
496
|
;
|
|
@@ -559,7 +560,7 @@ export const revokeOrgInvite = async (id: string,
|
|
|
559
560
|
|
|
560
561
|
|
|
561
562
|
export type resendOrgInviteResponse200 = {
|
|
562
|
-
data:
|
|
563
|
+
data: CreateOrganizationInviteResponse
|
|
563
564
|
status: 200
|
|
564
565
|
}
|
|
565
566
|
|
|
@@ -322,7 +322,7 @@ export const useDeleteAgentGroup = <TError = unknown,
|
|
|
322
322
|
return useMutation(getDeleteAgentGroupMutationOptions(options));
|
|
323
323
|
}
|
|
324
324
|
/**
|
|
325
|
-
* @summary
|
|
325
|
+
* @summary File agents into a group, moving them out of any other group.
|
|
326
326
|
*/
|
|
327
327
|
export const addAgentGroupMembers = (
|
|
328
328
|
groupId: string,
|
|
@@ -373,7 +373,7 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
|
|
|
373
373
|
export type AddAgentGroupMembersMutationError = unknown
|
|
374
374
|
|
|
375
375
|
/**
|
|
376
|
-
* @summary
|
|
376
|
+
* @summary File agents into a group, moving them out of any other group.
|
|
377
377
|
*/
|
|
378
378
|
export const useAddAgentGroupMembers = <TError = unknown,
|
|
379
379
|
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addAgentGroupMembers>>, TError,{groupId: string;data: AgentGroupMembersRequest}, TContext>, request?: SecondParameter<typeof apiFetch>}
|
package/src/react/agents.ts
CHANGED
|
@@ -50,6 +50,14 @@ import type {
|
|
|
50
50
|
ArchiveAllAgentsBody
|
|
51
51
|
} from './model/archiveAllAgentsBody.js';
|
|
52
52
|
|
|
53
|
+
import type {
|
|
54
|
+
AttachAgentMcpServers200
|
|
55
|
+
} from './model/attachAgentMcpServers200.js';
|
|
56
|
+
|
|
57
|
+
import type {
|
|
58
|
+
AttachAgentMcpServersBody
|
|
59
|
+
} from './model/attachAgentMcpServersBody.js';
|
|
60
|
+
|
|
53
61
|
import type {
|
|
54
62
|
AxonEvent
|
|
55
63
|
} from './model/axonEvent.js';
|
|
@@ -1021,6 +1029,71 @@ export const useSetAgentMark = <TError = unknown,
|
|
|
1021
1029
|
return useMutation(getSetAgentMarkMutationOptions(options));
|
|
1022
1030
|
}
|
|
1023
1031
|
/**
|
|
1032
|
+
* Mints live MCP hub tokens for the devbox and registers each server in the agent's native config immediately, then records the ids on the agent's `mcp-servers` attachment. The devbox must be running (409 `agent_devbox_not_running` otherwise); a registration the box reports as failed is a 502 `mcp_registration_failed` with nothing persisted. `activation` reports whether the agent process that is running right now loaded the servers (`active`, usable on its next turn) or whether they wait on disk for its next start (`deferred`) — both are successful attaches. Already-attached ids are skipped, unknown or disabled ids are dropped (compare the returned agent's attachments to detect a partial drop), and the request 404s `mcp_config_not_found` only when no id resolves. Local (stdio) servers are rejected because their subprocess secrets only exist as create-time devbox params.
|
|
1033
|
+
* @summary Attach MCP servers to a running agent's devbox.
|
|
1034
|
+
*/
|
|
1035
|
+
export const attachAgentMcpServers = (
|
|
1036
|
+
id: string,
|
|
1037
|
+
attachAgentMcpServersBody: AttachAgentMcpServersBody,
|
|
1038
|
+
options?: SecondParameter<typeof apiFetch>,signal?: AbortSignal
|
|
1039
|
+
) => {
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
return apiFetch<AttachAgentMcpServers200>(
|
|
1043
|
+
{url: `/agents/${encodeURIComponent(String(id))}/mcp-servers`, method: 'POST',
|
|
1044
|
+
headers: {'Content-Type': 'application/json', },
|
|
1045
|
+
data: attachAgentMcpServersBody, signal
|
|
1046
|
+
},
|
|
1047
|
+
options);
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
export const getAttachAgentMcpServersMutationOptions = <TError = unknown,
|
|
1053
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachAgentMcpServers>>, TError,{id: string;data: AttachAgentMcpServersBody}, TContext>, request?: SecondParameter<typeof apiFetch>}
|
|
1054
|
+
): UseMutationOptions<Awaited<ReturnType<typeof attachAgentMcpServers>>, TError,{id: string;data: AttachAgentMcpServersBody}, TContext> => {
|
|
1055
|
+
|
|
1056
|
+
const mutationKey = ['attachAgentMcpServers'];
|
|
1057
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?
|
|
1058
|
+
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
1059
|
+
options
|
|
1060
|
+
: {...options, mutation: {...options.mutation, mutationKey}}
|
|
1061
|
+
: {mutation: { mutationKey, }, request: undefined};
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof attachAgentMcpServers>>, {id: string;data: AttachAgentMcpServersBody}> = (props) => {
|
|
1067
|
+
const {id,data} = props ?? {};
|
|
1068
|
+
|
|
1069
|
+
return attachAgentMcpServers(id,data,requestOptions)
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
return { mutationFn, ...mutationOptions }}
|
|
1078
|
+
|
|
1079
|
+
export type AttachAgentMcpServersMutationResult = NonNullable<Awaited<ReturnType<typeof attachAgentMcpServers>>>
|
|
1080
|
+
export type AttachAgentMcpServersMutationBody = AttachAgentMcpServersBody
|
|
1081
|
+
export type AttachAgentMcpServersMutationError = unknown
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* @summary Attach MCP servers to a running agent's devbox.
|
|
1085
|
+
*/
|
|
1086
|
+
export const useAttachAgentMcpServers = <TError = unknown,
|
|
1087
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachAgentMcpServers>>, TError,{id: string;data: AttachAgentMcpServersBody}, TContext>, request?: SecondParameter<typeof apiFetch>}
|
|
1088
|
+
): UseMutationResult<
|
|
1089
|
+
Awaited<ReturnType<typeof attachAgentMcpServers>>,
|
|
1090
|
+
TError,
|
|
1091
|
+
{id: string;data: AttachAgentMcpServersBody},
|
|
1092
|
+
TContext
|
|
1093
|
+
> => {
|
|
1094
|
+
return useMutation(getAttachAgentMcpServersMutationOptions(options));
|
|
1095
|
+
}
|
|
1096
|
+
/**
|
|
1024
1097
|
* Returns 201 with the acknowledging event once the message reaches the agent. With mailbox command delivery, a send whose outcome is still unknown at the bounded wait returns 202 with { status: "pending", commandId }: the message is accepted and durable, delivery just has not been confirmed yet.
|
|
1025
1098
|
* @summary Send a message to the agent's chat.
|
|
1026
1099
|
*/
|
package/src/react/auth.ts
CHANGED
|
@@ -18,6 +18,10 @@ import type {
|
|
|
18
18
|
UseQueryResult
|
|
19
19
|
} from '@tanstack/react-query';
|
|
20
20
|
|
|
21
|
+
import type {
|
|
22
|
+
AcknowledgeDeviceAuthTokenBody
|
|
23
|
+
} from './model/acknowledgeDeviceAuthTokenBody.js';
|
|
24
|
+
|
|
21
25
|
import type {
|
|
22
26
|
DevLogin200
|
|
23
27
|
} from './model/devLogin200.js';
|
|
@@ -165,6 +169,70 @@ export const useDevLogin = <TError = unknown,
|
|
|
165
169
|
return useMutation(getDevLoginMutationOptions(options));
|
|
166
170
|
}
|
|
167
171
|
/**
|
|
172
|
+
* Idempotently erases the encrypted handoff after the client has durably stored the returned API key.
|
|
173
|
+
* @summary Acknowledge that a device credential was saved.
|
|
174
|
+
*/
|
|
175
|
+
export const acknowledgeDeviceAuthToken = (
|
|
176
|
+
acknowledgeDeviceAuthTokenBody: AcknowledgeDeviceAuthTokenBody,
|
|
177
|
+
options?: SecondParameter<typeof apiFetch>,signal?: AbortSignal
|
|
178
|
+
) => {
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
return apiFetch<void>(
|
|
182
|
+
{url: `/auth/device/acknowledge`, method: 'POST',
|
|
183
|
+
headers: {'Content-Type': 'application/json', },
|
|
184
|
+
data: acknowledgeDeviceAuthTokenBody, signal
|
|
185
|
+
},
|
|
186
|
+
options);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
export const getAcknowledgeDeviceAuthTokenMutationOptions = <TError = unknown,
|
|
192
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof acknowledgeDeviceAuthToken>>, TError,{data: AcknowledgeDeviceAuthTokenBody}, TContext>, request?: SecondParameter<typeof apiFetch>}
|
|
193
|
+
): UseMutationOptions<Awaited<ReturnType<typeof acknowledgeDeviceAuthToken>>, TError,{data: AcknowledgeDeviceAuthTokenBody}, TContext> => {
|
|
194
|
+
|
|
195
|
+
const mutationKey = ['acknowledgeDeviceAuthToken'];
|
|
196
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?
|
|
197
|
+
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
198
|
+
options
|
|
199
|
+
: {...options, mutation: {...options.mutation, mutationKey}}
|
|
200
|
+
: {mutation: { mutationKey, }, request: undefined};
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof acknowledgeDeviceAuthToken>>, {data: AcknowledgeDeviceAuthTokenBody}> = (props) => {
|
|
206
|
+
const {data} = props ?? {};
|
|
207
|
+
|
|
208
|
+
return acknowledgeDeviceAuthToken(data,requestOptions)
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
return { mutationFn, ...mutationOptions }}
|
|
217
|
+
|
|
218
|
+
export type AcknowledgeDeviceAuthTokenMutationResult = NonNullable<Awaited<ReturnType<typeof acknowledgeDeviceAuthToken>>>
|
|
219
|
+
export type AcknowledgeDeviceAuthTokenMutationBody = AcknowledgeDeviceAuthTokenBody
|
|
220
|
+
export type AcknowledgeDeviceAuthTokenMutationError = unknown
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @summary Acknowledge that a device credential was saved.
|
|
224
|
+
*/
|
|
225
|
+
export const useAcknowledgeDeviceAuthToken = <TError = unknown,
|
|
226
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof acknowledgeDeviceAuthToken>>, TError,{data: AcknowledgeDeviceAuthTokenBody}, TContext>, request?: SecondParameter<typeof apiFetch>}
|
|
227
|
+
): UseMutationResult<
|
|
228
|
+
Awaited<ReturnType<typeof acknowledgeDeviceAuthToken>>,
|
|
229
|
+
TError,
|
|
230
|
+
{data: AcknowledgeDeviceAuthTokenBody},
|
|
231
|
+
TContext
|
|
232
|
+
> => {
|
|
233
|
+
return useMutation(getAcknowledgeDeviceAuthTokenMutationOptions(options));
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
168
236
|
* @summary Start a device sign-in and return the device and user codes.
|
|
169
237
|
*/
|
|
170
238
|
export const startDeviceAuth = (
|
|
@@ -228,7 +296,7 @@ export const useStartDeviceAuth = <TError = unknown,
|
|
|
228
296
|
return useMutation(getStartDeviceAuthMutationOptions(options));
|
|
229
297
|
}
|
|
230
298
|
/**
|
|
231
|
-
* Responds 202 while approval is pending. On approval the minted API key
|
|
299
|
+
* Responds 202 while approval is pending. On approval the minted API key remains replayable until the client acknowledges durable storage.
|
|
232
300
|
* @summary Poll a device sign-in for its result.
|
|
233
301
|
*/
|
|
234
302
|
export const pollDeviceAuthToken = (
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.18.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Reflex API
|
|
5
|
+
* OpenAPI spec version: 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
import type { Agent } from './agent.js';
|
|
8
|
+
import type { AttachAgentMcpServers200Activation } from './attachAgentMcpServers200Activation.js';
|
|
9
|
+
|
|
10
|
+
export type AttachAgentMcpServers200 = {
|
|
11
|
+
agent: Agent;
|
|
12
|
+
activation: AttachAgentMcpServers200Activation;
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.18.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Reflex API
|
|
5
|
+
* OpenAPI spec version: 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type AttachAgentMcpServers200Activation = {
|
|
9
|
+
state: 'active';
|
|
10
|
+
serverNames: string[];
|
|
11
|
+
} | {
|
|
12
|
+
state: 'deferred';
|
|
13
|
+
reason: 'restart-required' | 'agent-unreachable';
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.18.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Reflex API
|
|
5
|
+
* OpenAPI spec version: 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
import type { OrganizationInvite } from './organizationInvite.js';
|
|
8
|
+
|
|
9
|
+
export interface CreateOrganizationInviteResponse {
|
|
10
|
+
invite: OrganizationInvite;
|
|
11
|
+
redeemUrl: string;
|
|
12
|
+
emailSent: boolean;
|
|
13
|
+
reissued: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.18.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Reflex API
|
|
5
|
+
* OpenAPI spec version: 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type ListOrgInvitesStatus = typeof ListOrgInvitesStatus[keyof typeof ListOrgInvitesStatus];
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export const ListOrgInvitesStatus = {
|
|
12
|
+
pending: 'pending',
|
|
13
|
+
active: 'active',
|
|
14
|
+
consumed: 'consumed',
|
|
15
|
+
revoked: 'revoked',
|
|
16
|
+
declined: 'declined',
|
|
17
|
+
all: 'all',
|
|
18
|
+
} as const;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.18.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Reflex API
|
|
5
|
+
* OpenAPI spec version: 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
import type { OrganizationInviteStatus } from './organizationInviteStatus.js';
|
|
8
|
+
|
|
9
|
+
export interface OrganizationInvite {
|
|
10
|
+
id: string;
|
|
11
|
+
organizationId: string;
|
|
12
|
+
/** @pattern ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$ */
|
|
13
|
+
email: string;
|
|
14
|
+
invitedByUserId: string;
|
|
15
|
+
reissuedAt: number | null;
|
|
16
|
+
reissuedByUserId: string | null;
|
|
17
|
+
createdAt: number;
|
|
18
|
+
expiresAt: number;
|
|
19
|
+
consumedAt: number | null;
|
|
20
|
+
consumedByUserId: string | null;
|
|
21
|
+
revokedAt: number | null;
|
|
22
|
+
revokedByUserId: string | null;
|
|
23
|
+
declinedAt: number | null;
|
|
24
|
+
declinedByUserId: string | null;
|
|
25
|
+
status: OrganizationInviteStatus;
|
|
26
|
+
tokenLast4: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.18.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Reflex API
|
|
5
|
+
* OpenAPI spec version: 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type OrganizationInviteStatus = typeof OrganizationInviteStatus[keyof typeof OrganizationInviteStatus];
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export const OrganizationInviteStatus = {
|
|
12
|
+
pending: 'pending',
|
|
13
|
+
consumed: 'consumed',
|
|
14
|
+
revoked: 'revoked',
|
|
15
|
+
expired: 'expired',
|
|
16
|
+
declined: 'declined',
|
|
17
|
+
} as const;
|
|
@@ -62,6 +62,10 @@ import type {
|
|
|
62
62
|
CreateOrganizationBody
|
|
63
63
|
} from './model/createOrganizationBody.js';
|
|
64
64
|
|
|
65
|
+
import type {
|
|
66
|
+
CreateOrganizationInviteResponse
|
|
67
|
+
} from './model/createOrganizationInviteResponse.js';
|
|
68
|
+
|
|
65
69
|
import type {
|
|
66
70
|
CreateTeamModelProviderSecretBody
|
|
67
71
|
} from './model/createTeamModelProviderSecretBody.js';
|
|
@@ -988,7 +992,7 @@ export const createOrgInvite = (
|
|
|
988
992
|
) => {
|
|
989
993
|
|
|
990
994
|
|
|
991
|
-
return apiFetch<
|
|
995
|
+
return apiFetch<CreateOrganizationInviteResponse>(
|
|
992
996
|
{url: `/organizations/${encodeURIComponent(String(id))}/invites`, method: 'POST',
|
|
993
997
|
headers: {'Content-Type': 'application/json', },
|
|
994
998
|
data: createOrgInviteBody, signal
|
|
@@ -1115,7 +1119,7 @@ export const resendOrgInvite = (
|
|
|
1115
1119
|
) => {
|
|
1116
1120
|
|
|
1117
1121
|
|
|
1118
|
-
return apiFetch<
|
|
1122
|
+
return apiFetch<CreateOrganizationInviteResponse>(
|
|
1119
1123
|
{url: `/organizations/${encodeURIComponent(String(id))}/invites/${encodeURIComponent(String(inviteId))}/resend`, method: 'POST', signal
|
|
1120
1124
|
},
|
|
1121
1125
|
options);
|