@leaflow/sdk 0.193.0 → 0.195.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/fleet/v1/generated/functions.d.ts +49 -7
- package/dist/fleet/v1/generated/functions.js +46 -3
- package/dist/fleet/v1/generated/models.d.ts +21 -8
- package/dist/fleet/v1/generated/schemas.zod.d.ts +43 -6
- package/dist/fleet/v1/generated/schemas.zod.js +52 -6
- package/dist/fleet/v1/generated/validators/accountList.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/accountList.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/accountResource.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/accountResource.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/approveEnrollmentRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/approveEnrollmentRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/callMcpToolRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/callMcpToolRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/callMcpToolResponse.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/callMcpToolResponse.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/createGroupMemberRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/createGroupMemberRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/createGroupRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/createGroupRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/createMachineRegistrationRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/createMachineRegistrationRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/createMachineRegistrationResponse.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/createMachineRegistrationResponse.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/createParticipantRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/createParticipantRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/createParticipantResponse.zod.d.ts +7 -3
- package/dist/fleet/v1/generated/validators/createParticipantResponse.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/createPeerConnectionCandidatesRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/createPeerConnectionCandidatesRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/createPeerConnectionRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/createPeerConnectionRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/createSessionRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/createSessionRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/cursorPagination.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/cursorPagination.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/deleteMcpServerParams.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/deleteMcpServerParams.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/denyPrivilegeRequestRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/denyPrivilegeRequestRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/desktopOptions.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/desktopOptions.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/desktopState.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/desktopState.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/directoryName.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/directoryName.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/enrollmentResource.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/enrollmentResource.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/enrollmentState.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/enrollmentState.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/error.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/error.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/errorStatus.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/errorStatus.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/featureState.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/featureState.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/fieldViolation.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/fieldViolation.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/findEnrollmentByPairingCodeParams.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/findEnrollmentByPairingCodeParams.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/findEnrollmentResponse.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/findEnrollmentResponse.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/getPeerConnectionParams.zod.d.ts +248 -0
- package/dist/fleet/v1/generated/validators/getPeerConnectionParams.zod.js +250 -0
- package/dist/fleet/v1/generated/validators/groupList.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/groupList.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/groupResource.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/groupResource.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/iceCandidate.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/iceCandidate.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/iceServer.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/iceServer.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/listAccountsParams.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/listAccountsParams.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/listGroupMembersParams.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/listGroupMembersParams.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/listGroupsParams.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/listGroupsParams.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/listMachineEventsParams.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/listMachineEventsParams.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/listMachineRegistrationsParams.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/listMachineRegistrationsParams.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/listMachinesParams.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/listMachinesParams.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/listMcpToolsParams.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/listMcpToolsParams.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/listPrivilegeAutoApprovalsParams.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/listPrivilegeAutoApprovalsParams.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/listPrivilegeRequestsParams.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/listPrivilegeRequestsParams.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/listSessionsParams.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/listSessionsParams.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/machineEventList.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/machineEventList.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/machineEventResource.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/machineEventResource.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/machineEventType.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/machineEventType.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/machineFeature.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/machineFeature.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/machineList.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/machineList.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/machineRegistrationList.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/machineRegistrationList.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/machineRegistrationResource.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/machineRegistrationResource.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/machineRegistrationState.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/machineRegistrationState.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/machineResource.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/machineResource.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/mcpConfigurationFile.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/mcpConfigurationFile.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/mcpConfigurationResource.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/mcpConfigurationResource.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/mcpImplementation.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/mcpImplementation.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/mcpServerFailure.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/mcpServerFailure.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/mcpServerResource.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/mcpServerResource.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/mcpToolList.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/mcpToolList.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/mcpToolResource.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/mcpToolResource.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/mcpTransport.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/mcpTransport.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/mcpUnavailableServer.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/mcpUnavailableServer.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/migrationStep.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/migrationStep.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/namedIdentity.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/namedIdentity.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/offsetPagination.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/offsetPagination.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/operatingSystem.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/operatingSystem.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/participantList.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/participantList.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/participantResource.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/participantResource.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/peerConnection.zod.d.ts +8 -3
- package/dist/fleet/v1/generated/validators/peerConnection.zod.js +12 -4
- package/dist/fleet/v1/generated/validators/privilegeAutoApprovalList.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/privilegeAutoApprovalList.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/privilegeAutoApprovalMode.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/privilegeAutoApprovalMode.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/privilegeAutoApprovalResource.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/privilegeAutoApprovalResource.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/privilegeDecider.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/privilegeDecider.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/privilegeRequestList.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/privilegeRequestList.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/privilegeRequestResource.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/privilegeRequestResource.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/privilegeRequestState.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/privilegeRequestState.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/publicKey.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/publicKey.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/renewParticipantRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/renewParticipantRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/renewParticipantResponse.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/renewParticipantResponse.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/replaceMcpConfigurationRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/replaceMcpConfigurationRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/rtcConfiguration.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/rtcConfiguration.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/runCommandRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/runCommandRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/runCommandResponse.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/runCommandResponse.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/sendMcpRequestRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/sendMcpRequestRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/sendMcpRequestResponse.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/sendMcpRequestResponse.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/sessionCloseReason.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/sessionCloseReason.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/sessionList.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/sessionList.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/sessionMode.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/sessionMode.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/sessionResource.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/sessionResource.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/sessionState.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/sessionState.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/signedMessage.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/signedMessage.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/signingKey.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/signingKey.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/updateAccountRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/updateAccountRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/updateGroupRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/updateGroupRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/updateMachineRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/updateMachineRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/updateMcpServerRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/updateMcpServerRequest.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/updateMcpServerResponse.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/updateMcpServerResponse.zod.js +6 -3
- package/dist/fleet/v1/generated/validators/updatePrivilegeAutoApprovalRequest.zod.d.ts +6 -3
- package/dist/fleet/v1/generated/validators/updatePrivilegeAutoApprovalRequest.zod.js +6 -3
- package/dist/proto/leaflow/fleet/control/v1/control_pb.d.ts +13 -0
- package/dist/proto/leaflow/fleet/control/v1/control_pb.js +1 -1
- package/dist/proto/leaflow/fleet/transport/v1/transport_pb.d.ts +6 -9
- package/dist/proto/leaflow/fleet/virtualdesktop/input/v1/input_pb.d.ts +238 -33
- package/dist/proto/leaflow/fleet/virtualdesktop/input/v1/input_pb.js +194 -16
- package/dist/proto/leaflow/fleet/virtualdesktop/window/v1/window_pb.d.ts +162 -0
- package/dist/proto/leaflow/fleet/virtualdesktop/window/v1/window_pb.js +127 -5
- package/dist/routes.d.ts +8 -0
- package/dist/routes.js +9 -0
- package/package.json +1 -1
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -235,7 +238,7 @@
|
|
|
235
238
|
* revoked. A participant whose creation failed is not announced.
|
|
236
239
|
* OpenAPI spec version: 1.0.0
|
|
237
240
|
*/
|
|
238
|
-
import type { AccountList, AccountResource, ApproveEnrollmentRequest, CallMcpToolRequest, CallMcpToolResponse, CreateGroupMemberRequest, CreateGroupRequest, CreateMachineRegistrationRequest, CreateMachineRegistrationResponse, CreateParticipantRequest, CreateParticipantResponse, CreatePeerConnectionCandidatesRequest, CreatePeerConnectionRequest, CreateSessionRequest, DeleteMcpServerParams, DenyPrivilegeRequestRequest, EnrollmentResource, Error, FindEnrollmentByPairingCodeParams, FindEnrollmentResponse, GroupList, GroupResource, ListAccountsParams, ListGroupMembersParams, ListGroupsParams, ListMachineEventsParams, ListMachineRegistrationsParams, ListMachinesParams, ListMcpToolsParams, ListPrivilegeAutoApprovalsParams, ListPrivilegeRequestsParams, ListSessionsParams, MachineEventList, MachineList, MachineRegistrationList, MachineRegistrationResource, MachineResource, McpConfigurationFile, McpConfigurationResource, McpToolList, MigrationStep, ParticipantList, ParticipantResource, PeerConnection, PrivilegeAutoApprovalList, PrivilegeAutoApprovalResource, PrivilegeRequestList, PrivilegeRequestResource, RenewParticipantRequest, RenewParticipantResponse, ReplaceMcpConfigurationRequest, RtcConfiguration, RunCommandRequest, RunCommandResponse, SendMcpRequestRequest, SendMcpRequestResponse, SessionList, SessionResource, UpdateAccountRequest, UpdateGroupRequest, UpdateMachineRequest, UpdateMcpServerRequest, UpdateMcpServerResponse, UpdatePrivilegeAutoApprovalRequest } from "./models.js";
|
|
241
|
+
import type { AccountList, AccountResource, ApproveEnrollmentRequest, CallMcpToolRequest, CallMcpToolResponse, CreateGroupMemberRequest, CreateGroupRequest, CreateMachineRegistrationRequest, CreateMachineRegistrationResponse, CreateParticipantRequest, CreateParticipantResponse, CreatePeerConnectionCandidatesRequest, CreatePeerConnectionRequest, CreateSessionRequest, DeleteMcpServerParams, DenyPrivilegeRequestRequest, EnrollmentResource, Error, FindEnrollmentByPairingCodeParams, FindEnrollmentResponse, GetPeerConnectionParams, GroupList, GroupResource, ListAccountsParams, ListGroupMembersParams, ListGroupsParams, ListMachineEventsParams, ListMachineRegistrationsParams, ListMachinesParams, ListMcpToolsParams, ListPrivilegeAutoApprovalsParams, ListPrivilegeRequestsParams, ListSessionsParams, MachineEventList, MachineList, MachineRegistrationList, MachineRegistrationResource, MachineResource, McpConfigurationFile, McpConfigurationResource, McpToolList, MigrationStep, ParticipantList, ParticipantResource, PeerConnection, PrivilegeAutoApprovalList, PrivilegeAutoApprovalResource, PrivilegeRequestList, PrivilegeRequestResource, RenewParticipantRequest, RenewParticipantResponse, ReplaceMcpConfigurationRequest, RtcConfiguration, RunCommandRequest, RunCommandResponse, SendMcpRequestRequest, SendMcpRequestResponse, SessionList, SessionResource, UpdateAccountRequest, UpdateGroupRequest, UpdateMachineRequest, UpdateMcpServerRequest, UpdateMcpServerResponse, UpdatePrivilegeAutoApprovalRequest } from "./models.js";
|
|
239
242
|
export type HTTPStatusCode1xx = 100 | 101 | 102 | 103;
|
|
240
243
|
export type HTTPStatusCode2xx = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207;
|
|
241
244
|
export type HTTPStatusCode3xx = 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308;
|
|
@@ -1438,7 +1441,8 @@ export declare const getCreateParticipantUrl: (sessionId: string) => string;
|
|
|
1438
1441
|
* Admits one participant with the given public key to the session: signs its authorization,
|
|
1439
1442
|
* has the session accept it, and starts its first PeerConnection with the offer. The answer
|
|
1440
1443
|
* carries the participant, its authorization and the PeerConnection with the session's
|
|
1441
|
-
* answer
|
|
1444
|
+
* answer and the ICE candidates the session has passed so far; read its later candidates
|
|
1445
|
+
* with `get-peer-connection`. The participant lasts while it is renewed.
|
|
1442
1446
|
*
|
|
1443
1447
|
* Joining again with the public key of one of the caller's participants of the session that
|
|
1444
1448
|
* has not ended, with the same `client_name`, `read_only` and `permissions`, returns that
|
|
@@ -1610,8 +1614,9 @@ export type createPeerConnectionResponse = createPeerConnectionResponseSuccess |
|
|
|
1610
1614
|
export declare const getCreatePeerConnectionUrl: (sessionId: string, participantId: number) => string;
|
|
1611
1615
|
/**
|
|
1612
1616
|
* Starts another PeerConnection of the participant with the offer, such as after a path
|
|
1613
|
-
* failed, and returns the session's answer,
|
|
1614
|
-
* PeerAuthorization
|
|
1617
|
+
* failed, and returns the session's answer, the ICE candidates it has passed so far and the
|
|
1618
|
+
* signed PeerAuthorization; read its later candidates with `get-peer-connection`. Move the
|
|
1619
|
+
* participant's connection to it with
|
|
1615
1620
|
* `prepare-participant-migration` and `commit-participant-migration`.
|
|
1616
1621
|
*
|
|
1617
1622
|
* Only the participant's user may start one.
|
|
@@ -1627,6 +1632,43 @@ export declare const getCreatePeerConnectionUrl: (sessionId: string, participant
|
|
|
1627
1632
|
* @summary Start a PeerConnection
|
|
1628
1633
|
*/
|
|
1629
1634
|
export declare const createPeerConnection: (sessionId: string, participantId: number, createPeerConnectionRequest: CreatePeerConnectionRequest, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<createPeerConnectionResponse>;
|
|
1635
|
+
export type getPeerConnectionResponse200 = {
|
|
1636
|
+
data: PeerConnection;
|
|
1637
|
+
status: 200;
|
|
1638
|
+
};
|
|
1639
|
+
export type getPeerConnectionResponseDefault = {
|
|
1640
|
+
data: Error;
|
|
1641
|
+
status: Exclude<HTTPStatusCodes, 200>;
|
|
1642
|
+
};
|
|
1643
|
+
export type getPeerConnectionResponseSuccess = getPeerConnectionResponse200 & {
|
|
1644
|
+
headers: Headers;
|
|
1645
|
+
};
|
|
1646
|
+
export type getPeerConnectionResponseError = getPeerConnectionResponseDefault & {
|
|
1647
|
+
headers: Headers;
|
|
1648
|
+
};
|
|
1649
|
+
export type getPeerConnectionResponse = getPeerConnectionResponseSuccess | getPeerConnectionResponseError;
|
|
1650
|
+
export declare const getGetPeerConnectionUrl: (sessionId: string, participantId: number, peerConnectionId: string, params?: GetPeerConnectionParams) => string;
|
|
1651
|
+
/**
|
|
1652
|
+
* Returns the PeerConnection with the ICE candidates the session has passed so far. The
|
|
1653
|
+
* session passes its candidates as it gathers them (RFC 8838), so most arrive after the
|
|
1654
|
+
* PeerConnection started: read it until `candidates_complete`, and add the candidates that
|
|
1655
|
+
* are new since the last read to the PeerConnection. A client keeps those that arrive before
|
|
1656
|
+
* it has set the answer as the remote description, and adds them once it has.
|
|
1657
|
+
*
|
|
1658
|
+
* With `known_candidates`, the request waits until the session has passed more candidates
|
|
1659
|
+
* than that or reported the end of its candidates, for at most 20 seconds, and then returns
|
|
1660
|
+
* the PeerConnection as it is.
|
|
1661
|
+
*
|
|
1662
|
+
* A PeerConnection can be read for 5 minutes after it started. Only the participant's user
|
|
1663
|
+
* may read it.
|
|
1664
|
+
*
|
|
1665
|
+
* Fails with:
|
|
1666
|
+
* - `PARTICIPANT_NOT_FOUND` when the participant has ended;
|
|
1667
|
+
* - `PEER_CONNECTION_NOT_FOUND` when the participant has no such PeerConnection, it was
|
|
1668
|
+
* abandoned, the session gave it up, or it started more than 5 minutes ago.
|
|
1669
|
+
* @summary Get a PeerConnection
|
|
1670
|
+
*/
|
|
1671
|
+
export declare const getPeerConnection: (sessionId: string, participantId: number, peerConnectionId: string, params?: GetPeerConnectionParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getPeerConnectionResponse>;
|
|
1630
1672
|
export type deletePeerConnectionResponse204 = {
|
|
1631
1673
|
data: void;
|
|
1632
1674
|
status: 204;
|
|
@@ -1319,7 +1319,8 @@ export const getCreateParticipantUrl = (sessionId) => {
|
|
|
1319
1319
|
* Admits one participant with the given public key to the session: signs its authorization,
|
|
1320
1320
|
* has the session accept it, and starts its first PeerConnection with the offer. The answer
|
|
1321
1321
|
* carries the participant, its authorization and the PeerConnection with the session's
|
|
1322
|
-
* answer
|
|
1322
|
+
* answer and the ICE candidates the session has passed so far; read its later candidates
|
|
1323
|
+
* with `get-peer-connection`. The participant lasts while it is renewed.
|
|
1323
1324
|
*
|
|
1324
1325
|
* Joining again with the public key of one of the caller's participants of the session that
|
|
1325
1326
|
* has not ended, with the same `client_name`, `read_only` and `permissions`, returns that
|
|
@@ -1534,8 +1535,9 @@ export const getCreatePeerConnectionUrl = (sessionId, participantId) => {
|
|
|
1534
1535
|
};
|
|
1535
1536
|
/**
|
|
1536
1537
|
* Starts another PeerConnection of the participant with the offer, such as after a path
|
|
1537
|
-
* failed, and returns the session's answer,
|
|
1538
|
-
* PeerAuthorization
|
|
1538
|
+
* failed, and returns the session's answer, the ICE candidates it has passed so far and the
|
|
1539
|
+
* signed PeerAuthorization; read its later candidates with `get-peer-connection`. Move the
|
|
1540
|
+
* participant's connection to it with
|
|
1539
1541
|
* `prepare-participant-migration` and `commit-participant-migration`.
|
|
1540
1542
|
*
|
|
1541
1543
|
* Only the participant's user may start one.
|
|
@@ -1576,6 +1578,47 @@ export const createPeerConnection = async (sessionId, participantId, createPeerC
|
|
|
1576
1578
|
const data = body ? JSON.parse(body) : {};
|
|
1577
1579
|
return { data, status: res.status, headers: res.headers };
|
|
1578
1580
|
};
|
|
1581
|
+
export const getGetPeerConnectionUrl = (sessionId, participantId, peerConnectionId, params) => {
|
|
1582
|
+
const normalizedParams = new URLSearchParams();
|
|
1583
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1584
|
+
if (value !== undefined) {
|
|
1585
|
+
normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1586
|
+
}
|
|
1587
|
+
});
|
|
1588
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1589
|
+
return stringifiedParams.length > 0
|
|
1590
|
+
? `https://fleet.leaflow.cloud/api/v1/sessions/${encodeURIComponent(String(sessionId))}/participants/${encodeURIComponent(String(participantId))}/peer-connections/${encodeURIComponent(String(peerConnectionId))}?${stringifiedParams}`
|
|
1591
|
+
: `https://fleet.leaflow.cloud/api/v1/sessions/${encodeURIComponent(String(sessionId))}/participants/${encodeURIComponent(String(participantId))}/peer-connections/${encodeURIComponent(String(peerConnectionId))}`;
|
|
1592
|
+
};
|
|
1593
|
+
/**
|
|
1594
|
+
* Returns the PeerConnection with the ICE candidates the session has passed so far. The
|
|
1595
|
+
* session passes its candidates as it gathers them (RFC 8838), so most arrive after the
|
|
1596
|
+
* PeerConnection started: read it until `candidates_complete`, and add the candidates that
|
|
1597
|
+
* are new since the last read to the PeerConnection. A client keeps those that arrive before
|
|
1598
|
+
* it has set the answer as the remote description, and adds them once it has.
|
|
1599
|
+
*
|
|
1600
|
+
* With `known_candidates`, the request waits until the session has passed more candidates
|
|
1601
|
+
* than that or reported the end of its candidates, for at most 20 seconds, and then returns
|
|
1602
|
+
* the PeerConnection as it is.
|
|
1603
|
+
*
|
|
1604
|
+
* A PeerConnection can be read for 5 minutes after it started. Only the participant's user
|
|
1605
|
+
* may read it.
|
|
1606
|
+
*
|
|
1607
|
+
* Fails with:
|
|
1608
|
+
* - `PARTICIPANT_NOT_FOUND` when the participant has ended;
|
|
1609
|
+
* - `PEER_CONNECTION_NOT_FOUND` when the participant has no such PeerConnection, it was
|
|
1610
|
+
* abandoned, the session gave it up, or it started more than 5 minutes ago.
|
|
1611
|
+
* @summary Get a PeerConnection
|
|
1612
|
+
*/
|
|
1613
|
+
export const getPeerConnection = async (sessionId, participantId, peerConnectionId, params, options, fetchFn) => {
|
|
1614
|
+
const res = await (fetchFn ?? fetch)(getGetPeerConnectionUrl(sessionId, participantId, peerConnectionId, params), {
|
|
1615
|
+
...options,
|
|
1616
|
+
method: "GET",
|
|
1617
|
+
});
|
|
1618
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1619
|
+
const data = body ? JSON.parse(body) : {};
|
|
1620
|
+
return { data, status: res.status, headers: res.headers };
|
|
1621
|
+
};
|
|
1579
1622
|
export const getDeletePeerConnectionUrl = (sessionId, participantId, peerConnectionId) => {
|
|
1580
1623
|
return `https://fleet.leaflow.cloud/api/v1/sessions/${encodeURIComponent(String(sessionId))}/participants/${encodeURIComponent(String(participantId))}/peer-connections/${encodeURIComponent(String(peerConnectionId))}`;
|
|
1581
1624
|
};
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -1265,13 +1268,13 @@ export interface PeerConnection {
|
|
|
1265
1268
|
/** The session's SDP answer (RFC 8866); it holds ICE credentials, so never log it */
|
|
1266
1269
|
answer: string;
|
|
1267
1270
|
/**
|
|
1268
|
-
* The session's ICE candidates
|
|
1269
|
-
*
|
|
1270
|
-
*
|
|
1271
|
-
* `relay`, relayed when it has TURN servers), and at most until 10 seconds after its
|
|
1272
|
-
* answer. Candidates the session gathers later are not passed on.
|
|
1271
|
+
* The session's ICE candidates passed so far, at most 64, in the order the session sent
|
|
1272
|
+
* them. Later reads return the same ones first.
|
|
1273
|
+
* @maxItems 64
|
|
1273
1274
|
*/
|
|
1274
1275
|
candidates: IceCandidate[];
|
|
1276
|
+
/** The session reported that it has gathered all its candidates; no more follow */
|
|
1277
|
+
candidates_complete: boolean;
|
|
1275
1278
|
/** The signed `PeerAuthorization` of the PeerConnection, the same one the session holds */
|
|
1276
1279
|
authorization: SignedMessage;
|
|
1277
1280
|
}
|
|
@@ -1580,3 +1583,13 @@ export type ListSessionsParams = {
|
|
|
1580
1583
|
*/
|
|
1581
1584
|
include_closed?: boolean;
|
|
1582
1585
|
};
|
|
1586
|
+
export type GetPeerConnectionParams = {
|
|
1587
|
+
/**
|
|
1588
|
+
* The number of the session's candidates the caller already has. The request waits until
|
|
1589
|
+
* there are more or the session reported the end of its candidates, for at most 20
|
|
1590
|
+
* seconds. Without it, the request returns at once.
|
|
1591
|
+
* @minimum 0
|
|
1592
|
+
* @maximum 64
|
|
1593
|
+
*/
|
|
1594
|
+
known_candidates?: number;
|
|
1595
|
+
};
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -960,7 +963,8 @@ export declare const GetSessionRtcConfigurationParams: zod.ZodObject<{
|
|
|
960
963
|
* Admits one participant with the given public key to the session: signs its authorization,
|
|
961
964
|
* has the session accept it, and starts its first PeerConnection with the offer. The answer
|
|
962
965
|
* carries the participant, its authorization and the PeerConnection with the session's
|
|
963
|
-
* answer
|
|
966
|
+
* answer and the ICE candidates the session has passed so far; read its later candidates
|
|
967
|
+
* with `get-peer-connection`. The participant lasts while it is renewed.
|
|
964
968
|
*
|
|
965
969
|
* Joining again with the public key of one of the caller's participants of the session that
|
|
966
970
|
* has not ended, with the same `client_name`, `read_only` and `permissions`, returns that
|
|
@@ -1105,8 +1109,9 @@ export declare const CommitParticipantMigrationBody: zod.ZodObject<{
|
|
|
1105
1109
|
}, zod.z.core.$strict>;
|
|
1106
1110
|
/**
|
|
1107
1111
|
* Starts another PeerConnection of the participant with the offer, such as after a path
|
|
1108
|
-
* failed, and returns the session's answer,
|
|
1109
|
-
* PeerAuthorization
|
|
1112
|
+
* failed, and returns the session's answer, the ICE candidates it has passed so far and the
|
|
1113
|
+
* signed PeerAuthorization; read its later candidates with `get-peer-connection`. Move the
|
|
1114
|
+
* participant's connection to it with
|
|
1110
1115
|
* `prepare-participant-migration` and `commit-participant-migration`.
|
|
1111
1116
|
*
|
|
1112
1117
|
* Only the participant's user may start one.
|
|
@@ -1130,6 +1135,38 @@ export declare const CreatePeerConnectionParams: zod.ZodObject<{
|
|
|
1130
1135
|
export declare const CreatePeerConnectionBody: zod.ZodObject<{
|
|
1131
1136
|
offer: zod.ZodString;
|
|
1132
1137
|
}, zod.z.core.$strict>;
|
|
1138
|
+
/**
|
|
1139
|
+
* Returns the PeerConnection with the ICE candidates the session has passed so far. The
|
|
1140
|
+
* session passes its candidates as it gathers them (RFC 8838), so most arrive after the
|
|
1141
|
+
* PeerConnection started: read it until `candidates_complete`, and add the candidates that
|
|
1142
|
+
* are new since the last read to the PeerConnection. A client keeps those that arrive before
|
|
1143
|
+
* it has set the answer as the remote description, and adds them once it has.
|
|
1144
|
+
*
|
|
1145
|
+
* With `known_candidates`, the request waits until the session has passed more candidates
|
|
1146
|
+
* than that or reported the end of its candidates, for at most 20 seconds, and then returns
|
|
1147
|
+
* the PeerConnection as it is.
|
|
1148
|
+
*
|
|
1149
|
+
* A PeerConnection can be read for 5 minutes after it started. Only the participant's user
|
|
1150
|
+
* may read it.
|
|
1151
|
+
*
|
|
1152
|
+
* Fails with:
|
|
1153
|
+
* - `PARTICIPANT_NOT_FOUND` when the participant has ended;
|
|
1154
|
+
* - `PEER_CONNECTION_NOT_FOUND` when the participant has no such PeerConnection, it was
|
|
1155
|
+
* abandoned, the session gave it up, or it started more than 5 minutes ago.
|
|
1156
|
+
* @summary Get a PeerConnection
|
|
1157
|
+
*/
|
|
1158
|
+
export declare const getPeerConnectionPathSessionIdMax = 40;
|
|
1159
|
+
export declare const getPeerConnectionPathSessionIdRegExp: RegExp;
|
|
1160
|
+
export declare const GetPeerConnectionParams: zod.ZodObject<{
|
|
1161
|
+
sessionId: zod.ZodString;
|
|
1162
|
+
participantId: zod.ZodInt;
|
|
1163
|
+
peerConnectionId: zod.ZodUUID;
|
|
1164
|
+
}, zod.z.core.$strict>;
|
|
1165
|
+
export declare const getPeerConnectionQueryKnownCandidatesMin = 0;
|
|
1166
|
+
export declare const getPeerConnectionQueryKnownCandidatesMax = 64;
|
|
1167
|
+
export declare const GetPeerConnectionQueryParams: zod.ZodObject<{
|
|
1168
|
+
known_candidates: zod.ZodOptional<zod.ZodInt>;
|
|
1169
|
+
}, zod.z.core.$strict>;
|
|
1133
1170
|
/**
|
|
1134
1171
|
* Tells the session to give up the PeerConnection and close it. Abandoning a PeerConnection
|
|
1135
1172
|
* that has ended succeeds.
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -1069,7 +1072,8 @@ export const GetSessionRtcConfigurationParams = zod.strictObject({
|
|
|
1069
1072
|
* Admits one participant with the given public key to the session: signs its authorization,
|
|
1070
1073
|
* has the session accept it, and starts its first PeerConnection with the offer. The answer
|
|
1071
1074
|
* carries the participant, its authorization and the PeerConnection with the session's
|
|
1072
|
-
* answer
|
|
1075
|
+
* answer and the ICE candidates the session has passed so far; read its later candidates
|
|
1076
|
+
* with `get-peer-connection`. The participant lasts while it is renewed.
|
|
1073
1077
|
*
|
|
1074
1078
|
* Joining again with the public key of one of the caller's participants of the session that
|
|
1075
1079
|
* has not ended, with the same `client_name`, `read_only` and `permissions`, returns that
|
|
@@ -1208,8 +1212,9 @@ export const CommitParticipantMigrationParams = zod.strictObject({
|
|
|
1208
1212
|
export const CommitParticipantMigrationBody = MigrationStep;
|
|
1209
1213
|
/**
|
|
1210
1214
|
* Starts another PeerConnection of the participant with the offer, such as after a path
|
|
1211
|
-
* failed, and returns the session's answer,
|
|
1212
|
-
* PeerAuthorization
|
|
1215
|
+
* failed, and returns the session's answer, the ICE candidates it has passed so far and the
|
|
1216
|
+
* signed PeerAuthorization; read its later candidates with `get-peer-connection`. Move the
|
|
1217
|
+
* participant's connection to it with
|
|
1213
1218
|
* `prepare-participant-migration` and `commit-participant-migration`.
|
|
1214
1219
|
*
|
|
1215
1220
|
* Only the participant's user may start one.
|
|
@@ -1235,6 +1240,47 @@ export const CreatePeerConnectionParams = zod.strictObject({
|
|
|
1235
1240
|
participantId: zod.int().min(1),
|
|
1236
1241
|
});
|
|
1237
1242
|
export const CreatePeerConnectionBody = CreatePeerConnectionRequest;
|
|
1243
|
+
/**
|
|
1244
|
+
* Returns the PeerConnection with the ICE candidates the session has passed so far. The
|
|
1245
|
+
* session passes its candidates as it gathers them (RFC 8838), so most arrive after the
|
|
1246
|
+
* PeerConnection started: read it until `candidates_complete`, and add the candidates that
|
|
1247
|
+
* are new since the last read to the PeerConnection. A client keeps those that arrive before
|
|
1248
|
+
* it has set the answer as the remote description, and adds them once it has.
|
|
1249
|
+
*
|
|
1250
|
+
* With `known_candidates`, the request waits until the session has passed more candidates
|
|
1251
|
+
* than that or reported the end of its candidates, for at most 20 seconds, and then returns
|
|
1252
|
+
* the PeerConnection as it is.
|
|
1253
|
+
*
|
|
1254
|
+
* A PeerConnection can be read for 5 minutes after it started. Only the participant's user
|
|
1255
|
+
* may read it.
|
|
1256
|
+
*
|
|
1257
|
+
* Fails with:
|
|
1258
|
+
* - `PARTICIPANT_NOT_FOUND` when the participant has ended;
|
|
1259
|
+
* - `PEER_CONNECTION_NOT_FOUND` when the participant has no such PeerConnection, it was
|
|
1260
|
+
* abandoned, the session gave it up, or it started more than 5 minutes ago.
|
|
1261
|
+
* @summary Get a PeerConnection
|
|
1262
|
+
*/
|
|
1263
|
+
export const getPeerConnectionPathSessionIdMax = 40;
|
|
1264
|
+
export const getPeerConnectionPathSessionIdRegExp = new RegExp("^[a-z0-9-]+$");
|
|
1265
|
+
export const GetPeerConnectionParams = zod.strictObject({
|
|
1266
|
+
sessionId: zod
|
|
1267
|
+
.string()
|
|
1268
|
+
.min(1)
|
|
1269
|
+
.max(getPeerConnectionPathSessionIdMax)
|
|
1270
|
+
.regex(getPeerConnectionPathSessionIdRegExp),
|
|
1271
|
+
participantId: zod.int().min(1),
|
|
1272
|
+
peerConnectionId: zod.uuid(),
|
|
1273
|
+
});
|
|
1274
|
+
export const getPeerConnectionQueryKnownCandidatesMin = 0;
|
|
1275
|
+
export const getPeerConnectionQueryKnownCandidatesMax = 64;
|
|
1276
|
+
export const GetPeerConnectionQueryParams = zod.strictObject({
|
|
1277
|
+
known_candidates: zod
|
|
1278
|
+
.int()
|
|
1279
|
+
.min(getPeerConnectionQueryKnownCandidatesMin)
|
|
1280
|
+
.max(getPeerConnectionQueryKnownCandidatesMax)
|
|
1281
|
+
.optional()
|
|
1282
|
+
.describe("The number of the session's candidates the caller already has. The request waits until\nthere are more or the session reported the end of its candidates, for at most 20\nseconds. Without it, the request returns at once."),
|
|
1283
|
+
});
|
|
1238
1284
|
/**
|
|
1239
1285
|
* Tells the session to give up the PeerConnection and close it. Abandoning a PeerConnection
|
|
1240
1286
|
* that has ended succeeds.
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|
|
@@ -201,9 +201,12 @@
|
|
|
201
201
|
* one second has passed, so that the offer carries them.
|
|
202
202
|
* 3. Join with `POST /api/v1/sessions/{sessionId}/participants`, sending the public key and the
|
|
203
203
|
* offer. The answer carries the participant's signed authorization, the keys the service
|
|
204
|
-
* signs with, and the first PeerConnection: the session's SDP answer,
|
|
205
|
-
* the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
-
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates
|
|
204
|
+
* signs with, and the first PeerConnection: the session's SDP answer, the ICE candidates it
|
|
205
|
+
* has passed so far and the signed PeerAuthorization. Pass candidates gathered later with
|
|
206
|
+
* `POST …/participants/{participantId}/peer-connections/{peerConnectionId}/candidates`, and
|
|
207
|
+
* read the session's later ones with
|
|
208
|
+
* `GET …/participants/{participantId}/peer-connections/{peerConnectionId}` until
|
|
209
|
+
* `candidates_complete`.
|
|
207
210
|
* 4. Renew the participant with `POST …/participants/{participantId}:renew` well before
|
|
208
211
|
* `lease_expires_at`, every 15 seconds, presenting the PeerAuthorization of each
|
|
209
212
|
* PeerConnection; the answer renews them. A participant whose lease runs out ends, and its
|