6989a98d75
- Arkitektur: docs/auth/passwordless-architecture.md - Backend: iom/quixzoom-auth-service/ (FastAPI + Redis) - Webb: quixzoom-market-pages/se/login/ (QR-kod + polling) - App: iom/quixzoom-app/src/features/auth/ (push + deep links) Flöde: QR-kod → app-godkännande → webb-inloggad
26 lines
1008 B
JavaScript
26 lines
1008 B
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
import * as WS from 'ws';
|
|
import { NodeWebSocket } from "../../internal/ws-adapter-node.mjs";
|
|
import { ResponsesWSBase } from "./ws-base.mjs";
|
|
export class ResponsesWS extends ResponsesWSBase {
|
|
constructor(client, options) {
|
|
if (!WS?.WebSocket) {
|
|
throw new Error('ResponsesWS from "openai/resources/responses/ws" requires the "ws" package but it could not be loaded.');
|
|
}
|
|
const { reconnect, maxQueueSize, ...wsOptions } = options ?? {};
|
|
super(client, { reconnect, maxQueueSize });
|
|
this._wsOptions = wsOptions;
|
|
this._connectInitial();
|
|
}
|
|
_createSocket(url, authHeaders) {
|
|
const ws = new WS.WebSocket(url, {
|
|
...this._wsOptions,
|
|
headers: {
|
|
...authHeaders,
|
|
...this._wsOptions?.headers,
|
|
},
|
|
});
|
|
return new NodeWebSocket(ws);
|
|
}
|
|
}
|
|
//# sourceMappingURL=ws.mjs.map
|